diff --git a/action.yml b/action.yml index 34c3921..88928e2 100644 --- a/action.yml +++ b/action.yml @@ -37,6 +37,14 @@ inputs: required: false default: '' +outputs: + computed-prefix: + description: > + The computed prefix, including '-' and 'v' if found. + version: + description: + The version number extracted from the tag. The tag name is a concatenation of computed-prefix + and version. runs: using: node16 main: main.js diff --git a/main.sh b/main.sh index 3552b6f..a0a778d 100755 --- a/main.sh +++ b/main.sh @@ -98,3 +98,8 @@ fi # https://cli.github.com/manual/gh_release_create gh release create ${draft_option:-} "${tag}" ${prerelease:-} --title "${title}" --notes "${notes:-}" + +# set (computed) prefix and version outputs for future step use +computed_prefix=${tag%"$version"} +echo "::set-output name=computed-prefix::${computed_prefix}" +echo "::set-output name=version::${version}"