File tree Expand file tree Collapse file tree 1 file changed +12
-35
lines changed Expand file tree Collapse file tree 1 file changed +12
-35
lines changed Original file line number Diff line number Diff line change 1- name : Update Main Version
2- run-name : Move ${{ github.event.inputs.major_version || 'latest branch tag' }} to ${{ github.event.inputs.target || github.sha }}
1+ name : Update release version
32
4- on :
5- push :
6- tags :
7- - ' v[0-9]+.**'
8- workflow_dispatch :
9- inputs :
10- target :
11- description : The tag or reference to use
12- required : true
13- major_version :
14- type : choice
15- description : The major version to update
16- options :
17- - v1
3+ permissions :
4+ contents : write
185
19- env :
20- MAJOR_VERSION : ' v1'
6+ on :
7+ release :
8+ types : [published]
219
2210jobs :
23- tag :
11+ update-version :
2412 runs-on : ubuntu-latest
25- permissions :
26- contents : write
2713 steps :
28- - uses : actions/checkout@v5
29- with :
30- fetch-depth : 0
31- - name : Git config
32- run : |
33- git config user.name github-actions
34- git config user.email [email protected] 35- # - name: Get major version from tag name
36- # if: ${{ github.event_name === 'push' }}
37- # run: echo "MAJOR_VERSION=`echo ${GITHUB_REF#refs/*/} | cut -c1-2`" >> $GITHUB_ENV
38- - name : Tag new target
39- run : git tag -f ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} ${{ github.event.inputs.target || github.sha }}
40- - name : Push new tag
41- run : git push origin ${{ github.event.inputs.major_version || env.MAJOR_VERSION }} --force
14+ - uses : actions/checkout@v5
15+ with :
16+ fetch-depth : 0
17+ - name : Run release-tagger
18+ uses : tj-actions/release-tagger@v4
You can’t perform that action at this time.
0 commit comments