1111 description : " The ref the release versions should point to"
1212 required : true
1313 type : string
14-
14+ outputs :
15+ major :
16+ description : " The major version"
17+ type : string
18+ value : ${{ jobs.update_release_versions.outputs.major }}
19+ minor :
20+ description : " The minor version"
21+ type : string
22+ value : ${{ jobs.update_release_versions.outputs.minor }}
23+ patch :
24+ description : " The patch version"
25+ type : string
26+ value : ${{ jobs.update_release_versions.outputs.patch }}
27+ major_tag :
28+ description : " The major tag that was created (the version number, e.g. 1)"
29+ type : string
30+ value : ${{ jobs.update_release_versions.outputs.major_tag }}
31+ minor_tag :
32+ description : " The minor tag that was created (the version number, e.g. 1.2)"
33+ type : string
34+ value : ${{ jobs.update_release_versions.outputs.minor_tag }}
1535jobs :
16- parse_version :
17- name : Parse Version
36+ update_release_versions :
37+ name : Update Release Versions
1838 runs-on : ubuntu-latest
1939 outputs :
2040 major : ${{ steps.parse.outputs.major }}
2141 minor : ${{ steps.parse.outputs.minor }}
2242 patch : ${{ steps.parse.outputs.patch }}
43+ major_tag : ${{ steps.update.outputs.major }}
44+ minor_tag : ${{ steps.update.outputs.minor }}
2345 steps :
2446 - name : Parse version
2547 id : parse
@@ -28,15 +50,19 @@ jobs:
2850 echo "minor=$(echo ${{ inputs.version }} | cut -d '.' -f 2)" >> $GITHUB_OUTPUT
2951 echo "patch=$(echo ${{ inputs.version }} | cut -d '.' -f 3)" >> $GITHUB_OUTPUT
3052
31- - uses : actions/checkout@v3
53+ - name : Checkout
54+ uses : actions/checkout@v3
3255 with :
3356 fetch-depth : 0
3457
3558 - name : Update tags
59+ id : update
3660 run : |
3761 MAJOR="${{ steps.parse.outputs.major }}"
3862 MINOR="${{ steps.parse.outputs.major }}.${{ steps.parse.outputs.minor }}"
3963 TARGET="${{ inputs.release_ref }}"
4064 git tag -f $MAJOR $TARGET
4165 git tag -f $MINOR $TARGET
42- git push origin $MAJOR $MINOR --force
66+ git push origin $MAJOR $MINOR --force
67+ echo "major=$MAJOR" >> $GITHUB_OUTPUT
68+ echo "minor=$MINOR" >> $GITHUB_OUTPUT
0 commit comments