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 and upload artifacts (linux/amd64 and darwin/arm64)
2+
3+ on :
4+ push :
5+ branches : ["**"]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ strategy :
12+ fail-fast : false
13+ matrix :
14+ include :
15+ - goos : linux
16+ goarch : amd64
17+ - goos : darwin
18+ goarch : arm64
19+
20+ steps :
21+ - name : Checkout repository
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Go
25+ uses : actions/setup-go@v5
26+ with :
27+ go-version-file : go.mod
28+ cache : true
29+
30+ - name : Download dependencies
31+ run : go get ./...
32+
33+ - name : Build (${{ matrix.goos }}-${{ matrix.goarch }})
34+ env :
35+ GOOS : ${{ matrix.goos }}
36+ GOARCH : ${{ matrix.goarch }}
37+ CGO_ENABLED : " 0"
38+ run : |
39+ mkdir -p dist
40+ echo "Building for $GOOS/$GOARCH"
41+ out="dist/csvdiff-${GOOS}-${GOARCH}"
42+ go build -o "$out"
43+
44+ - name : Upload artifact (${{ matrix.goos }}-${{ matrix.goarch }})
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : csvdiff-${{ matrix.goos }}-${{ matrix.goarch }}
48+ path : dist/csvdiff-${{ matrix.goos }}-${{ matrix.goarch }}
49+ if-no-files-found : error
50+ retention-days : 14
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ require (
1111 github.com/stretchr/testify v1.8.4
1212)
1313
14- go 1.13
14+ go 1.25.4
You can’t perform that action at this time.
0 commit comments