Skip to content

Commit e083e4f

Browse files
Add GitHub Actions workflow for release process
1 parent a21caaa commit e083e4f

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
2+
name: Release
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: '1.23'
24+
25+
- name: Build amd64
26+
run: |
27+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
28+
go build -o nodedata
29+
tar czf nodedata-${GITHUB_REF_NAME}-linux-amd64.tar.gz nodedata
30+
31+
- name: Build arm64
32+
run: |
33+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 \
34+
go build -o nodedata
35+
tar czf nodedata-${GITHUB_REF_NAME}-linux-arm64.tar.gz nodedata
36+
37+
- name: Release
38+
uses: softprops/action-gh-release@v2
39+
with:
40+
files: |
41+
nodedata-${{ github.ref_name }}-linux-amd64.tar.gz
42+
nodedata-${{ github.ref_name }}-linux-arm64.tar.gz

0 commit comments

Comments
 (0)