File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 44 release :
55 types : [published]
66
7+ workflow_dispatch :
8+ inputs :
9+ tag :
10+ description : ' Release tag (e.g. v1.0.0)'
11+ required : true
12+ type : string
13+
714permissions :
815 contents : write
916
@@ -13,15 +20,20 @@ jobs:
1320 steps :
1421 - name : Checkout
1522 uses : actions/checkout@v4
23+ with :
24+ ref : ${{ inputs.tag || github.ref }}
25+ token : ${{ secrets.GH_PAT_FOR_UPDATE_TAG }}
1626
1727 - name : Extract major version
1828 id : version
1929 run : |
20- TAG="${GITHUB_REF_NAME}" # e.g. v0 .0.2
21- MAJOR="${TAG%%.*}" # e.g. v0
30+ TAG="${{ inputs.tag || github.ref_name }}" # e.g. v1 .0.0
31+ MAJOR="${TAG%%.*}" # e.g. v1
2232 echo "major=$MAJOR" >> "$GITHUB_OUTPUT"
2333
2434 - name : Update major version tag
2535 run : |
26- git tag -fa "${{ steps.version.outputs.major }}" -m "Update ${{ steps.version.outputs.major }} to ${{ github.ref_name }}"
36+ git config user.name "github-actions[bot]"
37+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+ git tag -fa "${{ steps.version.outputs.major }}" -m "Update ${{ steps.version.outputs.major }} to ${{ inputs.tag || github.ref_name }}"
2739 git push origin "${{ steps.version.outputs.major }}" --force
You can’t perform that action at this time.
0 commit comments