File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 1313
1414 build :
1515 runs-on : macos-latest
16+ permissions :
17+ contents : write
1618 strategy :
1719 matrix :
1820 go :
3234 - uses : actions/checkout@v4
3335 with :
3436 path : getargv.go
37+ fetch-tags : true
38+ fetch-depth : 0 # until https://github.com/actions/checkout/issues/1471 fixed
3539 - name : Set up Go
3640 uses : actions/setup-go@v5
3741 with :
4347
4448 - name : Test
4549 run : go test -C getargv.go
50+
51+ - name : Bump Version
52+ id : bump_version
53+ run : git tag | sort -V | tail -1 | awk -F. 'BEGIN { OFS = "." } {$NF+=1; print $0}' | xargs -I {} echo "new_version={}" >> $GITHUB_OUTPUT
54+ working-directory : getargv-swift
55+ - name : create && push tag
56+ run : |
57+ git tag '${{ steps.bump_version.outputs.new_version }}'
58+ git push origin tag '${{ steps.bump_version.outputs.new_version }}'
59+ git push origin HEAD:main
60+ working-directory : getargv-swift
61+ - uses : softprops/action-gh-release@v1
62+ with :
63+ name : ${{ steps.bump_version.outputs.new_version }}
64+ tag_name : ${{ steps.bump_version.outputs.new_version }}
You can’t perform that action at this time.
0 commit comments