File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 30
30
run : |
31
31
git config user.name 'github-actions'
32
32
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
33
- - name : Update tag with parameter
34
- if : github.event.inputs.tag != ''
35
- run : |
36
- git tag -fa ${{ inputs.tag }} -m 'Retag ${{ inputs.tag }}'
37
- git push origin ${{ inputs.tag }} --force
38
33
- name : Update rolling tag
39
- if : github.event.inputs.tag == ''
40
34
run : |
41
- git tag -fa v2 -m 'Retag v2'
42
- git push origin v2 --force
35
+ # Get the major version from the latest tag
36
+ MAJOR_VERSION=`git tag --list --sort=-v:refname | head -n1 | cut -d. -f1`
37
+ git tag --force --annotate ${{ inputs.tag || '$MAJOR_VERSION' }} --message 'Retag ${{ inputs.tag || '$MAJOR_VERSION' }}'
38
+ git push origin ${{ inputs.tag || '$MAJOR_VERSION' }} --force
You can’t perform that action at this time.
0 commit comments