11name : Binary Builds
22
33on :
4- push :
5- tags :
6- - ' *'
4+ release :
5+ types : [created]
76
87jobs :
9- release-linux-amd64 :
10- name : release linux/amd64
8+ releases-matrix :
9+ name : Release Go Binary
1110 runs-on : ubuntu-latest
11+ strategy :
12+ matrix :
13+ # build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64
14+ goos : [linux, windows, darwin]
15+ goarch : ["386", amd64, arm64]
16+ exclude :
17+ - goarch : " 386"
18+ goos : darwin
1219 steps :
13- - uses : actions/checkout@v2
14- - uses : wangyoucao577/go-release-action@v1.18
15- with :
16- github_token : ${{ secrets.GITHUB_TOKEN }}
17- goos : linux
18- goarch : amd64
19- release-linux-arm64 :
20- name : release linux/arm64
21- runs-on : ubuntu-latest
22- steps :
23- - uses : actions/checkout@v2
24- - uses : wangyoucao577/go-release-action@v1.18
25- with :
26- github_token : ${{ secrets.GITHUB_TOKEN }}
27- goos : linux
28- goarch : arm64
29- release-darwin-amd64 :
30- name : release darwin/amd64
31- runs-on : macOS-latest
32- steps :
33- - uses : actions/checkout@v2
34- - uses : wangyoucao577/go-release-action@v1.18
35- with :
36- github_token : ${{ secrets.GITHUB_TOKEN }}
37- goos : darwin
38- goarch : amd64
39- release-darwin-arm64 :
40- name : release darwin/arm64
41- runs-on : macOS-latest
42- steps :
43- - uses : actions/checkout@v2
44- - uses : wangyoucao577/go-release-action@v1.18
45- with :
46- github_token : ${{ secrets.GITHUB_TOKEN }}
47- goos : darwin
48- goarch : arm64
20+ - uses : actions/checkout@v2
21+ - uses : wangyoucao577/go-release-action@v1.18
22+ with :
23+ github_token : ${{ secrets.GITHUB_TOKEN }}
24+ goos : ${{ matrix.goos }}
25+ goarch : ${{ matrix.goarch }}
0 commit comments