-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
Based on a PoC done in phly/keep-a-changelog. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'Create major/minor tags' | ||
description: 'Create a list of major and minor versions to tag from the current tag.' | ||
outputs: | ||
original-tag: | ||
description: 'Original tag name' | ||
tags: | ||
description: 'Multiline string with tag names to create, one per line.' | ||
|
||
runs: | ||
using: 'node12' | ||
main: 'index.js' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const core = require('@actions/core'); | ||
const semver = require('semver') | ||
|
||
let tagRef = core.getInput('tag-ref'); | ||
let tag = tagRef.split('/').pop(); | ||
|
||
let major = semver.major(tag); | ||
let minor = major + '.' + semver.minor(tag); | ||
|
||
let tags = [ | ||
'v' + major, | ||
'v' + minor, | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
glensc
|
||
]; | ||
|
||
core.info(`Tags: ${JSON.stringify(tags)}`); | ||
core.setOutput('tags', tags.join("\n")); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
sholdn't this be
'v' + major + '.' + minor
?