Skip to content

Commit 96b8b42

Browse files
committed
fixup workflow
1 parent 57b209a commit 96b8b42

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/go.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313

1414
build:
1515
runs-on: macos-latest
16-
permissions:
17-
contents: write
1816
strategy:
1917
matrix:
2018
go:
@@ -34,30 +32,34 @@ jobs:
3432
- uses: actions/checkout@v4
3533
with:
3634
path: getargv.go
37-
fetch-tags: true
38-
fetch-depth: 0 # until https://github.com/actions/checkout/issues/1471 fixed
3935
- name: Set up Go
4036
uses: actions/setup-go@v5
4137
with:
4238
go-version: ${{ matrix.go }}
4339
check-latest: true
44-
4540
- name: Build
4641
run: go build -C getargv.go
47-
4842
- name: Test
4943
run: go test -C getargv.go
5044

45+
release:
46+
name: Release
47+
runs-on: macos-latest
48+
permissions:
49+
contents: write
50+
steps:
51+
- uses: actions/checkout@v4
52+
with:
53+
fetch-tags: true
54+
fetch-depth: 0 # until https://github.com/actions/checkout/issues/1471 fixed
5155
- name: Bump Version
5256
id: bump_version
5357
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
5558
- name: create && push tag
5659
run: |
5760
git tag '${{ steps.bump_version.outputs.new_version }}'
5861
git push origin tag '${{ steps.bump_version.outputs.new_version }}'
5962
git push origin HEAD:main
60-
working-directory: getargv-swift
6163
- uses: softprops/action-gh-release@v1
6264
with:
6365
name: ${{ steps.bump_version.outputs.new_version }}

0 commit comments

Comments
 (0)