Add both "plain" and v prefix version outputs

This commit is contained in:
Phil Jay
2022-02-10 22:27:59 +11:00
parent fde70f2da9
commit ba14b463c4
3 changed files with 18 additions and 3 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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]}"