File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Client/Server CI/CD
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+
15+ - name : Set up Go
16+ uses : actions/setup-go@v2
17+ with :
18+ go-version : 1.17
19+
20+ - name : Build
21+ run : |
22+ mkdir linux-amd64/
23+ GOOS=linux GOARCH=amd64 go build -v -o linux-amd64/ ./cmd/...
24+ find ./linux-amd64 -type f -exec mv {} {}-linux-amd64 \;
25+
26+ mkdir windows-amd64/
27+ GOOS=windows GOARCH=amd64 go build -v -o windows-amd64/ ./cmd/...
28+
29+ mkdir darwin-arm64/
30+ GOOS=darwin GOARCH=arm64 go build -v -o darwin-arm64/ ./cmd/...
31+ find ./darwin-arm64 -type f -exec mv {} {}-darwin-arm64 \;
32+
33+ mkdir darwin-amd64/
34+ GOOS=darwin GOARCH=amd64 go build -v -o darwin-amd64/ ./cmd/...
35+ find ./darwin-amd64 -type f -exec mv {} {}-darwin-amd64 \;
36+
37+ - uses : ncipollo/release-action@v1
38+ with :
39+ artifacts : " linux-amd64/*,windows-amd64/*,darwin-arm64/*, darwin-amd64/*"
40+ token : ${{ secrets.GITHUB_TOKEN }}
41+
You can’t perform that action at this time.
0 commit comments