@@ -29,42 +29,62 @@ jobs:
2929 - name : Build Linux binary
3030 run : cargo build --release --target x86_64-unknown-linux-gnu
3131
32- - name : Build macOS binaries (using cross)
33- run : |
34- cargo install cross --git https://github.com/cross-rs/cross
35- cross build --release --target x86_64-apple-darwin
36- cross build --release --target aarch64-apple-darwin
32+ - name : Install cross tool
33+ run : cargo install cross --git https://github.com/cross-rs/cross
34+
35+ - name : Build macOS Intel binary
36+ run : cross build --release --target x86_64-apple-darwin
37+ continue-on-error : true
38+
39+ - name : Build macOS ARM binary
40+ run : cross build --release --target aarch64-apple-darwin
41+ continue-on-error : true
3742
3843 - name : Build Windows binary
39- run : |
40- cross build --release --target x86_64-pc-windows-msvc
44+ run : cross build --release --target x86_64-pc-windows-msvc
45+ continue-on-error : true
4146
4247 - name : Prepare binaries
4348 run : |
44- # Copy binaries with proper names
45- cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy-linux-x86_64
46- cp target/x86_64-apple-darwin /release/shimmy shimmy-macos-intel
47- cp target/aarch64-apple-darwin /release/shimmy shimmy-macos-arm64
48- cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy-windows-x86_64.exe
49+ # Copy binaries with proper names (only if they exist)
50+ if [ -f target/x86_64-unknown-linux-gnu/release/shimmy ]; then
51+ cp target/x86_64-unknown-linux-gnu /release/shimmy shimmy-linux-x86_64
52+ cp target/x86_64-unknown-linux-gnu /release/shimmy shimmy
53+ fi
4954
50- # Also create generic names for quickstart docs
51- cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy
52- cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy.exe
55+ if [ -f target/x86_64-apple-darwin/release/shimmy ]; then
56+ cp target/x86_64-apple-darwin/release/shimmy shimmy-macos-intel
57+ fi
58+
59+ if [ -f target/aarch64-apple-darwin/release/shimmy ]; then
60+ cp target/aarch64-apple-darwin/release/shimmy shimmy-macos-arm64
61+ fi
62+
63+ if [ -f target/x86_64-pc-windows-msvc/release/shimmy.exe ]; then
64+ cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy-windows-x86_64.exe
65+ cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy.exe
66+ fi
5367
5468 # List all created files
55- ls -la shimmy*
69+ echo "Available binaries:"
70+ ls -la shimmy* || echo "No binaries created yet"
5671
5772 - name : Create release (only on tags)
5873 if : startsWith(github.ref, 'refs/tags/')
5974 env :
6075 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6176 run : |
77+ # Build list of files to upload
78+ FILES=""
79+ [ -f shimmy-linux-x86_64 ] && FILES="$FILES shimmy-linux-x86_64"
80+ [ -f shimmy-macos-intel ] && FILES="$FILES shimmy-macos-intel"
81+ [ -f shimmy-macos-arm64 ] && FILES="$FILES shimmy-macos-arm64"
82+ [ -f shimmy-windows-x86_64.exe ] && FILES="$FILES shimmy-windows-x86_64.exe"
83+ [ -f shimmy ] && FILES="$FILES shimmy"
84+ [ -f shimmy.exe ] && FILES="$FILES shimmy.exe"
85+
86+ echo "Uploading files: $FILES"
6287 gh release create ${{ github.ref_name }} \
63- shimmy-linux-x86_64 \
64- shimmy-macos-intel \
65- shimmy-macos-arm64 \
66- shimmy-windows-x86_64.exe \
67- shimmy \
68- shimmy.exe \
88+ $FILES \
6989 --title "Shimmy ${{ github.ref_name }}" \
7090 --generate-notes
0 commit comments