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 : CI
2+
3+ on :
4+ push :
5+ branches : [main]
6+ tags : ["v*"]
7+ pull_request :
8+ branches : [main]
9+
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-go@v5
16+ with :
17+ go-version-file : go.mod
18+ - run : go test ./...
19+
20+ build :
21+ runs-on : ubuntu-latest
22+ needs : test
23+ steps :
24+ - uses : actions/checkout@v4
25+ - uses : actions/setup-go@v5
26+ with :
27+ go-version-file : go.mod
28+
29+ - name : Build doubletake
30+ run : CGO_ENABLED=0 go build -ldflags='-s -w -extldflags=-static' -o doubletake ./cmd/doubletake
31+
32+ - name : Build doubletake-ctl
33+ run : CGO_ENABLED=0 go build -ldflags='-s -w -extldflags=-static' -o doubletake-ctl ./cmd/doubletake-ctl
34+
35+ - uses : actions/upload-artifact@v4
36+ with :
37+ name : binaries
38+ path : |
39+ doubletake
40+ doubletake-ctl
41+
42+ release :
43+ if : startsWith(github.ref, 'refs/tags/v')
44+ runs-on : ubuntu-latest
45+ needs : build
46+ permissions :
47+ contents : write
48+ steps :
49+ - uses : actions/download-artifact@v4
50+ with :
51+ name : binaries
52+
53+ - name : Create GitHub Release
54+ uses : softprops/action-gh-release@v2
55+ with :
56+ files : |
57+ doubletake
58+ doubletake-ctl
You can’t perform that action at this time.
0 commit comments