From ba14b463c4b2d58e7ae16f3c2710740dc8737571 Mon Sep 17 00:00:00 2001 From: Phil Jay Date: Thu, 10 Feb 2022 22:27:59 +1100 Subject: [PATCH] Add both "plain" and `v` prefix version outputs --- README.md | 3 +++ action.yml | 9 +++++++++ version-increment.sh | 9 ++++++--- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2a1b53e..35d12c1 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,9 @@ Examples: | major-version | Major number of the incremented version | | minor-version | Minor number of the incremented version | | patch-version | Patch number of the incremented version | +| major-v-version | Major number of the incremented version, prefixed with a `v` character | +| minor-v-version | Minor number of the incremented version, prefixed with a `v` character | +| patch-v-version | Patch number of the incremented version, prefixed with a `v` character | ## 💕 Contributing diff --git a/action.yml b/action.yml index eec63da..3e496a1 100644 --- a/action.yml +++ b/action.yml @@ -41,6 +41,15 @@ outputs: patch-version: description: 'Patch number of the incremented version' value: ${{ steps.version-increment.outputs.patch-version }} + major-v-version: + description: 'Major number of the incremented version, prefixed with a `v` charatcter' + value: ${{ steps.version-increment.outputs.major-v-version }} + minor-v-version: + description: 'Minor number of the incremented version, prefixed with a `v` charatcter' + value: ${{ steps.version-increment.outputs.minor-v-version }} + patch-v-version: + description: 'Patch number of the incremented version, prefixed with a `v` charatcter' + value: ${{ steps.version-increment.outputs.patch-v-version }} runs: using: "composite" diff --git a/version-increment.sh b/version-increment.sh index ebf7cee..278d38b 100755 --- a/version-increment.sh +++ b/version-increment.sh @@ -88,6 +88,9 @@ echo "â„šī¸ The new version is ${new_version}" echo "::set-output name=version::${new_version}" echo "::set-output name=v-version::v${new_version}" -echo "::set-output name=major-version::v${version_array[0]}" -echo "::set-output name=minor-version::v${version_array[1]}" -echo "::set-output name=patch-version::v${version_array[2]}" +echo "::set-output name=major-version::${version_array[0]}" +echo "::set-output name=minor-version::${version_array[1]}" +echo "::set-output name=patch-version::${version_array[2]}" +echo "::set-output name=major-v-version::v${version_array[0]}" +echo "::set-output name=minor-v-version::v${version_array[1]}" +echo "::set-output name=patch-v-version::v${version_array[2]}"