Skip to content

Commit 97a4242

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
Add release job to CI: build aidlcli for arm64 and amd64 on tag push
Triggered by v* tags after tests pass. Builds static Linux binaries for both architectures and creates a GitHub release with the artifacts.
1 parent 4d24de5 commit 97a4242

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [main]
6+
tags: ['v*']
67
pull_request:
78
branches: [main]
89

@@ -45,3 +46,32 @@ jobs:
4546
make smoke
4647
make readme
4748
git diff --exit-code
49+
50+
release:
51+
needs: test
52+
if: startsWith(github.ref, 'refs/tags/v')
53+
runs-on: ubuntu-latest
54+
permissions:
55+
contents: write
56+
steps:
57+
- uses: actions/checkout@v4
58+
with:
59+
submodules: true
60+
fetch-depth: 1
61+
62+
- uses: actions/setup-go@v5
63+
with:
64+
go-version: '1.25.x'
65+
66+
- name: Build aidlcli binaries
67+
run: |
68+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o aidlcli-linux-arm64 ./cmd/aidlcli/
69+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o aidlcli-linux-amd64 ./cmd/aidlcli/
70+
71+
- name: Create release
72+
uses: softprops/action-gh-release@v2
73+
with:
74+
files: |
75+
aidlcli-linux-arm64
76+
aidlcli-linux-amd64
77+
generate_release_notes: true

0 commit comments

Comments
 (0)