File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 release :
55 types :
66 - published
7+ push :
8+ tags :
9+ - " v*.*.*"
710 workflow_dispatch :
811 inputs :
912 tag :
1013 description : " Semver tag to align the major tag to (e.g. v8.3.8)"
1114 required : true
1215
16+ permissions :
17+ contents : write
18+
1319jobs :
1420 update-major-tag :
1521 runs-on : ubuntu-latest
16- if : ${{ github.event_name == 'workflow_dispatch' || github.event.release.prerelease == false }}
22+ if : ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'push' || github. event.release.prerelease == false }}
1723 steps :
1824 - name : Checkout
1925 uses : actions/checkout@v6
2228 - name : Extract major version
2329 id : version
2430 run : |
25- TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name }}"
31+ TAG_NAME="${{ github.event.inputs.tag || github.event.release.tag_name || github.ref_name }}"
2632 echo "Resolved tag: $TAG_NAME"
2733 if [[ ! "$TAG_NAME" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
2834 echo "::notice::'$TAG_NAME' is not a release semver tag (vX.Y.Z); skipping major-tag update."
You can’t perform that action at this time.
0 commit comments