This repository was archived by the owner on Aug 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +79
-1
lines changed Expand file tree Collapse file tree 3 files changed +79
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Go build and test
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+ workflow_dispatch :
9+
10+ jobs :
11+ build :
12+
13+ strategy :
14+ matrix :
15+ go-version : [1.15.x]
16+ platform : [ubuntu-latest, macos-latest, windows-latest]
17+
18+ runs-on : ${{ matrix.platform }}
19+
20+ steps :
21+
22+ - name : Set up Go ${{ matrix.node-version }}
23+ uses : actions/setup-go@v2
24+ with :
25+ go-version : ${{ matrix.go-version }}
26+
27+ - name : Check out code
28+ uses : actions/checkout@v2
29+
30+ - name : Build
31+ run : make
32+
33+ - name : Setup minimal git config
34+ run : git config --global user.email "action@github.com" && git config --global user.name "GitHub Action"
35+
36+ - name : Test
37+ run : make test
Original file line number Diff line number Diff line change 1+ name : Build release binaries
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - " v*"
8+
9+ jobs :
10+ build-release :
11+ runs-on : " ubuntu-latest"
12+
13+ steps :
14+ - name : Set up Go
15+ uses : actions/setup-go@v2
16+ with :
17+ go-version : 1.15.x
18+
19+ - name : Check out code
20+ uses : actions/checkout@v2
21+
22+ - name : Build
23+ run : make
24+
25+ - name : Setup minimal git config
26+ run : |
27+ git config --global user.email "action@github.com"
28+ git config --global user.name "GitHub Action"
29+
30+ - name : Test
31+ run : make test
32+
33+ - name : Build binaries
34+ run : go get github.com/mitchellh/gox && make releases
35+
36+ - uses : " marvinpinto/action-automatic-releases@latest"
37+ with :
38+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
39+ draft : true
40+ prerelease : false
41+ files : dist/*
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ install:
1616 go install -ldflags " $( LDFLAGS) " .
1717
1818releases :
19- gox -ldflags " $( LDFLAGS) " -output " dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
19+ gox -ldflags " $( LDFLAGS) " -osarch ' !darwin/386 ' - output " dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
2020
2121test :
2222 go test -v -bench=. ./...
You can’t perform that action at this time.
0 commit comments