88 required : true
99 type : string
1010 prerelease :
11- description : Mark the GitHub release as a prerelease and skip the major tag update
11+ description : Mark the GitHub release as a prerelease and skip moving action tag updates
1212 required : false
1313 default : false
1414 type : boolean
@@ -79,10 +79,15 @@ jobs:
7979 fi
8080
8181 version_without_prefix="${RELEASE_VERSION#v}"
82- major_version="v${version_without_prefix%%.*}"
82+ major="${version_without_prefix%%.*}"
83+ remaining="${version_without_prefix#*.}"
84+ minor="${remaining%%.*}"
85+ major_version="v$major"
86+ minor_version="v$major.$minor"
8387
8488 echo "version=$RELEASE_VERSION" >> "$GITHUB_OUTPUT"
8589 echo "major=$major_version" >> "$GITHUB_OUTPUT"
90+ echo "minor=$minor_version" >> "$GITHUB_OUTPUT"
8691 shell : bash
8792
8893 - name : Create immutable version tag
@@ -94,12 +99,15 @@ jobs:
9499 git push origin "refs/tags/$RELEASE_VERSION"
95100 shell : bash
96101
97- - name : Update major version tag
102+ - name : Update moving action tags
98103 if : ${{ !inputs.prerelease }}
99104 env :
100105 MAJOR_VERSION : ${{ steps.release.outputs.major }}
106+ MINOR_VERSION : ${{ steps.release.outputs.minor }}
101107 run : |
102108 set -euo pipefail
109+ git tag -f "$MINOR_VERSION" "$GITHUB_SHA"
110+ git push --force origin "refs/tags/$MINOR_VERSION"
103111 git tag -f "$MAJOR_VERSION" "$GITHUB_SHA"
104112 git push --force origin "refs/tags/$MAJOR_VERSION"
105113 shell : bash
0 commit comments