@@ -42,53 +42,42 @@ jobs:
4242 - name : Test
4343 run : make test
4444
45- release :
46- if : startsWith(github.ref, 'refs/tags/v')
47- needs : build-test
48- runs-on : ubuntu-latest
49- steps :
50- - name : Checkout code
51- uses : actions/checkout@v4
52-
53- - name : Set up Go
54- uses : actions/setup-go@v5
55- with :
56- go-version : ${{ env.GO_VERSION }}
57-
58- - name : Install dependencies
59- run : |
60- go mod tidy
61- go get github.com/stretchr/testify
62-
63- - name : Install golangci-lint
64- run : |
65- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin ${{ env.GOLANGCI_LINT_VERSION }}
66-
67- - name : Lint
68- run : make lint
69-
70- - name : Code format
71- run : |
72- if [ -f style.sh ]; then bash style.sh; fi
73-
74- - name : Build binaries (multi-platform)
45+ - name : Build binaries
46+ if : startsWith(github.ref, 'refs/tags/v')
7547 run : make build-binaries
7648
7749 - name : Package binaries
50+ if : startsWith(github.ref, 'refs/tags/v')
7851 run : make package-binaries
7952
8053 - name : Upload Binaries
54+ if : startsWith(github.ref, 'refs/tags/v')
8155 uses : actions/upload-artifact@v4
8256 with :
8357 name : binaries
8458 path : |
8559 dist/*.tar.gz
8660 dist/*.zip
8761
88- - name : Create GitHub Release
62+ release :
63+ name : Create GitHub Release
64+ if : startsWith(github.ref, 'refs/tags/v')
65+ needs : build-test
66+ runs-on : ubuntu-latest
67+
68+ steps :
69+ - name : Download Binaries
70+ uses : actions/download-artifact@v4
71+ with :
72+ name : binaries
73+
74+ - name : List Downloaded Files
75+ run : ls -l
76+
77+ - name : Create Release
8978 uses : ncipollo/release-action@v1
9079 with :
91- artifacts : dist/*
80+ artifacts : " *.tar.gz,*.zip "
9281 token : ${{ secrets.GITHUB_TOKEN }}
9382 tag : ${{ github.ref_name }}
9483 name : Release ${{ github.ref_name }}
0 commit comments