Skip to content

Commit 6e0c35b

Browse files
johnmorrowclaude
andcommitted
Add GitHub Actions workflow for release binaries
Builds macOS arm64 and Linux amd64 binaries on tag push and attaches them to the GitHub release. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7348971 commit 6e0c35b

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: ubuntu-latest
17+
target: x86_64-unknown-linux-gnu
18+
artifact: pk-linux-amd64
19+
- os: macos-latest
20+
target: aarch64-apple-darwin
21+
artifact: pk-macos-arm64
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: dtolnay/rust-toolchain@stable
26+
- run: cargo build --release --target ${{ matrix.target }}
27+
- run: cp target/${{ matrix.target }}/release/pk ${{ matrix.artifact }}
28+
- uses: actions/upload-artifact@v4
29+
with:
30+
name: ${{ matrix.artifact }}
31+
path: ${{ matrix.artifact }}
32+
33+
release:
34+
needs: build
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/download-artifact@v4
38+
with:
39+
merge-multiple: true
40+
- run: chmod +x pk-*
41+
- uses: softprops/action-gh-release@v2
42+
with:
43+
files: pk-*

0 commit comments

Comments
 (0)