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 : Release
2+
3+ on :
4+ push :
5+ tags : ["v*"]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ release :
12+ runs-on : ubuntu-latest
13+ strategy :
14+ matrix :
15+ include :
16+ - goos : linux
17+ goarch : amd64
18+ - goos : linux
19+ goarch : arm64
20+ - goos : darwin
21+ goarch : amd64
22+ - goos : darwin
23+ goarch : arm64
24+ - goos : windows
25+ goarch : amd64
26+ steps :
27+ - uses : actions/checkout@v4
28+
29+ - uses : actions/setup-go@v5
30+ with :
31+ go-version-file : go.mod
32+
33+ - name : Build
34+ env :
35+ GOOS : ${{ matrix.goos }}
36+ GOARCH : ${{ matrix.goarch }}
37+ run : |
38+ ext=""
39+ if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
40+ go build -trimpath -ldflags="-s -w" -o "gh-enterprise-contribution-sync-${GOOS}-${GOARCH}${ext}" .
41+
42+ - name : Upload artifact
43+ uses : actions/upload-artifact@v4
44+ with :
45+ name : gh-enterprise-contribution-sync-${{ matrix.goos }}-${{ matrix.goarch }}
46+ path : gh-enterprise-contribution-sync-*
47+
48+ publish :
49+ needs : release
50+ runs-on : ubuntu-latest
51+ steps :
52+ - uses : actions/download-artifact@v4
53+ with :
54+ merge-multiple : true
55+
56+ - name : Create GitHub Release
57+ env :
58+ GH_TOKEN : ${{ github.token }}
59+ TAG : ${{ github.ref_name }}
60+ run : gh release create "$TAG" --repo "$GITHUB_REPOSITORY" --generate-notes gh-enterprise-contribution-sync-*
Original file line number Diff line number Diff line change 1+ name : Test
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ permissions :
10+ contents : read
11+
12+ jobs :
13+ test :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - uses : actions/setup-go@v5
19+ with :
20+ go-version-file : go.mod
21+
22+ - run : go vet ./...
23+
24+ - run : go build -o gh-enterprise-contribution-sync .
You can’t perform that action at this time.
0 commit comments