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 Release
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+
7+ permissions :
8+ contents : write
9+
10+ jobs :
11+ build-and-release :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Set up Go
18+ uses : actions/setup-go@v4
19+ with :
20+ go-version : ' 1.25'
21+
22+ - name : Verify Go module
23+ run : |
24+ if [ ! -f go.mod ]; then
25+ go mod init github.com/noiseonwires/labean
26+ fi
27+ go mod tidy
28+
29+ - name : Generate release version
30+ id : version
31+ run : |
32+ VERSION=$(date +"%y%m%d")
33+ echo "version=$VERSION" >> $GITHUB_OUTPUT
34+ echo "Generated version: $VERSION"
35+
36+ - name : Build for Linux amd64
37+ run : |
38+ GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o labean-linux-amd64 .
39+
40+ - name : Build for Linux arm64
41+ run : |
42+ GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o labean-linux-arm64 .
43+
44+ - name : Create Release
45+ id : create_release
46+ uses : softprops/action-gh-release@v1
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+ with :
50+ tag_name : v${{ steps.version.outputs.version }}
51+ name : Release v${{ steps.version.outputs.version }}
52+ body : |
53+ Automated release built from commit ${{ github.sha }}
54+
55+ ## Changes
56+ - Built from latest master branch
57+
58+ ## Binaries
59+ - `labean-linux-amd64`: Linux x86_64 binary
60+ - `labean-linux-arm64`: Linux ARM64 binary
61+ draft : false
62+ prerelease : false
63+ files : |
64+ ./labean-linux-amd64
65+ ./labean-linux-arm64
Original file line number Diff line number Diff line change 1+ module github.com/noiseonwires/labean
2+
3+ go 1.25
You can’t perform that action at this time.
0 commit comments