Skip to content

Commit 66b4054

Browse files
author
Mike Kuykendall
committed
feat: Add automated cross-platform release workflow
- Builds binaries for Linux x86_64, macOS Intel/ARM64, Windows x86_64 - Triggered automatically on version tags (v*) - Creates both platform-specific and generic binary names - Addresses issue #1 - missing macOS/Linux distributions
1 parent 43236f7 commit 66b4054

1 file changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Install Rust
17+
uses: dtolnay/rust-toolchain@stable
18+
with:
19+
targets: x86_64-unknown-linux-gnu,x86_64-apple-darwin,aarch64-apple-darwin,x86_64-pc-windows-msvc
20+
21+
- name: Install cross-compilation tools
22+
run: |
23+
sudo apt-get update
24+
sudo apt-get install -y mingw-w64
25+
26+
- name: Build Linux binary
27+
run: cargo build --release --target x86_64-unknown-linux-gnu
28+
29+
- name: Build macOS Intel binary
30+
run: cargo build --release --target x86_64-apple-darwin
31+
32+
- name: Build macOS Apple Silicon binary
33+
run: cargo build --release --target aarch64-apple-darwin
34+
35+
- name: Build Windows binary
36+
run: cargo build --release --target x86_64-pc-windows-msvc
37+
38+
- name: Create release
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
run: |
42+
# Copy binaries with proper names
43+
cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy-linux-x86_64
44+
cp target/x86_64-apple-darwin/release/shimmy shimmy-macos-intel
45+
cp target/aarch64-apple-darwin/release/shimmy shimmy-macos-arm64
46+
cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy-windows-x86_64.exe
47+
48+
# Also create generic names for quickstart docs
49+
cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy
50+
cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy.exe
51+
52+
# Create release with all binaries
53+
gh release create ${{ github.ref_name }} \
54+
shimmy-linux-x86_64 \
55+
shimmy-macos-intel \
56+
shimmy-macos-arm64 \
57+
shimmy-windows-x86_64.exe \
58+
shimmy \
59+
shimmy.exe \
60+
--title "Shimmy ${{ github.ref_name }}" \
61+
--generate-notes

0 commit comments

Comments
 (0)