File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ # .github/workflows/upload-to-release.yml
2+
3+ name : Go Release
4+
5+ on :
6+ release :
7+ # types: [published]
8+ types : [created]
9+
10+
11+ jobs :
12+
13+ release-matrix :
14+ # if: github.repository == 'woytu/tool-gin'
15+ name : Build with go on ubuntu-latest and upload
16+ runs-on : ubuntu-latest
17+
18+ # strategy:
19+ # matrix:
20+ # goos: [linux, windows, darwin]
21+ # goarch: ["386", amd64]
22+
23+ steps :
24+
25+ - name : Install Go
26+ uses : actions/setup-go@v2
27+ with :
28+ go-version : ' ^1.13.1'
29+ id : go
30+
31+ - name : Check out source code
32+ uses : actions/checkout@v2
33+
34+ - name : Get dependencies
35+ run : |
36+ go get -v -t -d ./...
37+ if [ -f Gopkg.toml ]; then
38+ curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
39+ dep ensure
40+ fi
41+ - name : Build and compression
42+ run : |
43+ bash go_pack.sh
44+ - name : Upload to release
45+ uses : JasonEtco/upload-to-release@master
46+ with :
47+ args : tool-gin* application/octet-stream
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments