Skip to content

Commit b6592f3

Browse files
binocularsclaude
andcommitted
Add release workflow for automated builds
Creates GitHub releases with macOS ARM64 binaries when tags matching v* are pushed. Includes SHA256 checksums. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent f11a566 commit b6592f3

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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: macos-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
20+
- name: Install dependencies
21+
run: brew bundle
22+
23+
- name: Check Zig version
24+
run: zig version
25+
26+
- name: Build (Release)
27+
run: zig build -Doptimize=ReleaseFast
28+
29+
- name: Get version from tag
30+
id: version
31+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
32+
33+
- name: Create release archive
34+
run: |
35+
cd zig-out/bin
36+
tar -czvf grincel-${{ steps.version.outputs.VERSION }}-macos-arm64.tar.gz grincel
37+
shasum -a 256 grincel-${{ steps.version.outputs.VERSION }}-macos-arm64.tar.gz > grincel-${{ steps.version.outputs.VERSION }}-macos-arm64.tar.gz.sha256
38+
39+
- name: Create Release
40+
uses: softprops/action-gh-release@v2
41+
with:
42+
files: |
43+
zig-out/bin/grincel-${{ steps.version.outputs.VERSION }}-macos-arm64.tar.gz
44+
zig-out/bin/grincel-${{ steps.version.outputs.VERSION }}-macos-arm64.tar.gz.sha256
45+
generate_release_notes: true
46+
draft: false
47+
prerelease: ${{ contains(github.ref, '-') }}

0 commit comments

Comments
 (0)