Skip to content

Commit a21caaa

Browse files
Add GitHub Actions workflow for release builds
1 parent 9a0a036 commit a21caaa

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: '1.23'
23+
24+
- name: Build amd64
25+
run: |
26+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
27+
go build -o nodedata
28+
tar czf nodedata-${GITHUB_REF_NAME}-linux-amd64.tar.gz nodedata
29+
30+
- name: Build arm64
31+
run: |
32+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
33+
go build -o nodedata
34+
tar czf nodedata-${GITHUB_REF_NAME}-linux-arm64.tar.gz nodedata
35+
36+
- name: Release
37+
uses: softprops/action-gh-release@v2
38+
with:
39+
files: |
40+
nodedata-${{ github.ref_name }}-linux-amd64.tar.gz
41+
nodedata-${{ github.ref_name }}-linux-arm64.tar.gz

0 commit comments

Comments
 (0)