Exposing major, minor and patch numbers as outputs

This commit is contained in:
karunasa
2022-02-10 16:56:32 +11:00
parent 40611bca96
commit 8b854651df
3 changed files with 16 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
uses: actions/checkout@v2
- name: Get next version
uses: reecetech/version-increment@2022.2.3
uses: reecetech/version-increment@2022.2.4
id: version
with:
scheme: semver
@@ -88,6 +88,9 @@ Examples:
| current-v-version | The current latest version detected from the git repositories tags, prefixed with a `v` character |
| version | The incremented version number (e.g. the next version) |
| v-version | The incremented version number (e.g. the next version), prefixed with a `v` character |
| major-version | Major number of the incremented version |
| minor-version | Minor number of the incremented version |
| patch-version | Patch number of the incremented version |
## 💕 Contributing

View File

@@ -32,6 +32,15 @@ outputs:
v-version:
description: 'Incremented version calculated, prefixed with a `v` charatcter'
value: ${{ steps.version-increment.outputs.v-version }}
major-version:
description: 'Major number of the incremented version'
value: ${{ steps.version-increment.outputs.major-version }}
minor-version:
description: 'Minor number of the incremented version'
value: ${{ steps.version-increment.outputs.minor-version }}
patch-version:
description: 'Patch number of the incremented version'
value: ${{ steps.version-increment.outputs.patch-version }}
runs:
using: "composite"

View File

@@ -88,3 +88,6 @@ 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]}"