File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,14 @@ name: 'Create new version'
33on :
44 workflow_dispatch :
55 inputs :
6- version :
7- description : ' Select the type of version to create'
6+ minor :
7+ description : ' Minor version number'
8+ type : number
9+ required : true
10+ major :
11+ description : ' Major version number'
12+ type : number
813 required : true
9- type : choice
10- options :
11- - ' Breaking changes'
12- - ' Minor update'
1314
1415permissions :
1516 actions : read
@@ -24,12 +25,10 @@ concurrency:
2425jobs :
2526 versioning :
2627 name : ' Determine version'
27- needs : [workflow-variables]
2828 runs-on : ubuntu-latest
2929
3030 outputs :
31- major : ${{ inputs.version == 'Breaking changes' && fromJson(env.major + 1) || fromJson(env.major) }}
32- minor : ${{ inputs.version == 'Minor update' && fromJson(env.minor + 1) || fromJson(env.minor) }}
31+ is-breaking-change : ${{ inputs.major > steps.versioning.outputs.major }}
3332
3433 steps :
3534 - name : ' Checkout ${{ github.head_ref || github.ref }}'
5150 run : |
5251 echo "major: ${{ steps.versioning.outputs.major }}"
5352 echo "minor: ${{ steps.versioning.outputs.minor }}"
53+ echo "is-breaking-change: ${{ steps.versioning.outputs.is-breaking-change }}"
5454
5555
You can’t perform that action at this time.
0 commit comments