Commit 4cdef0b 1 parent 43f11c4 commit 4cdef0b Copy full SHA for 4cdef0b
File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Update Major Version Tag
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ update-major-version-tag :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout Repository
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Extract Major Version
15
+ id : extract_major_version
16
+ run : |
17
+ # Extract the major version part (e.g., "v2" from "v2.3.1")
18
+ echo "release_tag=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
19
+ major_version=$(echo "${{ github.event.release.tag_name }}" | grep -oE "^v[0-9]+")
20
+ echo "major_version=$major_version" >> $GITHUB_ENV
21
+
22
+ - name : Update Major Version Tag
23
+ run : |
24
+ git fetch --tags
25
+ git tag -f ${{ env.major_version }} ${{ github.event.release.tag_name }}
26
+ git push origin ${{ env.major_version }} --force
You can’t perform that action at this time.
0 commit comments