File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed 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+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - uses : actions/setup-go@v5
18+ with :
19+ go-version : ' stable'
20+
21+ - run : |
22+ mkdir -p dist
23+ platforms=(
24+ "windows-amd64"
25+ "linux-amd64"
26+ "darwin-amd64"
27+ "darwin-arm64"
28+ )
29+ for platform in "${platforms[@]}"; do
30+ GOOS=${platform%-*}
31+ GOARCH=${platform#*-}
32+ output_name="mergePDFs-${GOOS}-${GOARCH}"
33+ if [ "$GOOS" = "windows" ]; then
34+ output_name+=".exe"
35+ fi
36+ CGO_ENABLED=0 GOOS=$GOOS GOARCH=$GOARCH go build -o "dist/$output_name" mergePDFs.go
37+ done
38+
39+ - uses : softprops/action-gh-release@v2
40+ with :
41+ body : Release ${{ github.ref_name }}
42+ files : |
43+ dist/mergePDFs-windows-amd64.exe
44+ dist/mergePDFs-linux-amd64
45+ dist/mergePDFs-darwin-amd64
46+ dist/mergePDFs-darwin-arm64
You can’t perform that action at this time.
0 commit comments