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 :
6+ - " v*"
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ include :
17+ - goos : windows
18+ goarch : 386
19+ ext : .exe
20+ - goos : windows
21+ goarch : amd64
22+ ext : .exe
23+ - goos : windows
24+ goarch : arm64
25+ ext : .exe
26+ - goos : linux
27+ goarch : 386
28+ ext : " "
29+ - goos : linux
30+ goarch : amd64
31+ ext : " "
32+ - goos : linux
33+ goarch : arm64
34+ ext : " "
35+ - goos : darwin
36+ goarch : amd64
37+ ext : " "
38+ - goos : darwin
39+ goarch : arm64
40+ ext : " "
41+
42+ steps :
43+ - uses : actions/checkout@v4
44+
45+ - name : Set up Go
46+ uses : actions/setup-go@v5
47+ with :
48+ go-version-file : go.mod
49+
50+ - name : Build
51+ env :
52+ GOOS : ${{ matrix.goos }}
53+ GOARCH : ${{ matrix.goarch }}
54+ CGO_ENABLED : " 0"
55+ run : |
56+ BINARY_NAME="infverif-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.ext }}"
57+ go build -ldflags="-s -w -X main.appVersion=${GITHUB_REF_NAME}" -trimpath -o "${BINARY_NAME}" ./cmd/infverif
58+ echo "BINARY_NAME=${BINARY_NAME}" >> $GITHUB_ENV
59+
60+ - name : Upload artifact
61+ uses : actions/upload-artifact@v4
62+ with :
63+ name : infverif-${{ matrix.goos }}-${{ matrix.goarch }}
64+ path : ${{ env.BINARY_NAME }}
65+
66+ release :
67+ needs : build
68+ runs-on : ubuntu-latest
69+ steps :
70+ - name : Download all artifacts
71+ uses : actions/download-artifact@v4
72+ with :
73+ path : artifacts
74+ merge-multiple : true
75+
76+ - name : Create Release
77+ uses : softprops/action-gh-release@v2
78+ with :
79+ generate_release_notes : true
80+ files : artifacts/*
You can’t perform that action at this time.
0 commit comments