File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ branches : [master]
7+ paths :
8+ - " **.go"
9+ - " **.js"
10+ - " go.mod"
11+ - " go.sum"
12+ - " .github/workflows/build.yml"
13+ tags :
14+ - " v*"
15+ pull_request :
16+ branches : [master]
17+ paths :
18+ - " **.go"
19+ - " **.js"
20+ - " go.mod"
21+ - " go.sum"
22+ - " .github/workflows/build.yml"
23+
24+ jobs :
25+ build :
26+ runs-on : ubuntu-latest
27+ strategy :
28+ matrix :
29+ goarch : [amd64, arm64]
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - uses : actions/setup-go@v5
34+ with :
35+ go-version : " 1.21"
36+
37+ - run : go mod tidy
38+
39+ - name : Build for linux/${{ matrix.goarch }}
40+ env :
41+ GOOS : linux
42+ GOARCH : ${{ matrix.goarch }}
43+ run : go build -o jumpkwapp-linux-${{ matrix.goarch }} ./jumpkwapp.go
44+
45+ - name : Upload binary as artifact
46+ uses : actions/upload-artifact@v4
47+ with :
48+ name : jumpkwapp-linux-${{ matrix.goarch }}
49+ path : jumpkwapp-linux-${{ matrix.goarch }}
50+
51+ release :
52+ needs : build
53+ runs-on : ubuntu-latest
54+ if : startsWith(github.ref, 'refs/tags/v')
55+ permissions :
56+ contents : write
57+ steps :
58+ - name : Download all artifacts
59+ uses : actions/download-artifact@v4
60+
61+ - name : Create release
62+ uses : softprops/action-gh-release@v2
63+ with :
64+ files : |
65+ jumpkwapp-linux-amd64/jumpkwapp-linux-amd64
66+ jumpkwapp-linux-arm64/jumpkwapp-linux-arm64
Original file line number Diff line number Diff line change 1+ jumpkwapp
You can’t perform that action at this time.
0 commit comments