Skip to content

Commit f7f04d9

Browse files
backnotpropclaude
andcommitted
Fix: use cross-compilation for all targets from single runner
Bun supports cross-compilation, so we build all 4 targets (darwin-arm64, darwin-x64, linux-x64, win32-x64) from a single Ubuntu runner. This avoids the retired macos-13 runner issue. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 44abf97 commit f7f04d9

1 file changed

Lines changed: 25 additions & 35 deletions

File tree

.github/workflows/release.yml

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,7 @@ permissions:
1010

1111
jobs:
1212
build:
13-
strategy:
14-
matrix:
15-
include:
16-
- os: macos-latest
17-
target: darwin-arm64
18-
bun-target: bun-darwin-arm64
19-
- os: macos-13
20-
target: darwin-x64
21-
bun-target: bun-darwin-x64
22-
- os: ubuntu-latest
23-
target: linux-x64
24-
bun-target: bun-linux-x64
25-
- os: windows-latest
26-
target: win32-x64
27-
bun-target: bun-windows-x64
28-
29-
runs-on: ${{ matrix.os }}
13+
runs-on: ubuntu-latest
3014

3115
steps:
3216
- uses: actions/checkout@v4
@@ -41,25 +25,31 @@ jobs:
4125
- name: Build UI
4226
run: bun run build:hook
4327

44-
- name: Compile binary
45-
shell: bash
28+
- name: Compile binaries (cross-compile all targets)
4629
run: |
47-
if [ "${{ matrix.os }}" == "windows-latest" ]; then
48-
bun build apps/hook/server/index.ts --compile --target=${{ matrix.bun-target }} --outfile plannotator.exe
49-
mv plannotator.exe plannotator-${{ matrix.target }}.exe
50-
sha256sum plannotator-${{ matrix.target }}.exe > plannotator-${{ matrix.target }}.exe.sha256
51-
else
52-
bun build apps/hook/server/index.ts --compile --target=${{ matrix.bun-target }} --outfile plannotator
53-
mv plannotator plannotator-${{ matrix.target }}
54-
chmod +x plannotator-${{ matrix.target }}
55-
shasum -a 256 plannotator-${{ matrix.target }} > plannotator-${{ matrix.target }}.sha256 || sha256sum plannotator-${{ matrix.target }} > plannotator-${{ matrix.target }}.sha256
56-
fi
57-
58-
- name: Upload artifact
30+
# macOS ARM64
31+
bun build apps/hook/server/index.ts --compile --target=bun-darwin-arm64 --outfile plannotator-darwin-arm64
32+
sha256sum plannotator-darwin-arm64 > plannotator-darwin-arm64.sha256
33+
34+
# macOS x64
35+
bun build apps/hook/server/index.ts --compile --target=bun-darwin-x64 --outfile plannotator-darwin-x64
36+
sha256sum plannotator-darwin-x64 > plannotator-darwin-x64.sha256
37+
38+
# Linux x64
39+
bun build apps/hook/server/index.ts --compile --target=bun-linux-x64 --outfile plannotator-linux-x64
40+
sha256sum plannotator-linux-x64 > plannotator-linux-x64.sha256
41+
42+
# Windows x64
43+
bun build apps/hook/server/index.ts --compile --target=bun-windows-x64 --outfile plannotator-win32-x64.exe
44+
sha256sum plannotator-win32-x64.exe > plannotator-win32-x64.exe.sha256
45+
46+
- name: Upload artifacts
5947
uses: actions/upload-artifact@v4
6048
with:
61-
name: ${{ matrix.target }}
62-
path: plannotator-${{ matrix.target }}*
49+
name: binaries
50+
path: |
51+
plannotator-*
52+
!*.ts
6353
6454
release:
6555
needs: build
@@ -70,11 +60,11 @@ jobs:
7060
steps:
7161
- uses: actions/checkout@v4
7262

73-
- name: Download all artifacts
63+
- name: Download artifacts
7464
uses: actions/download-artifact@v4
7565
with:
66+
name: binaries
7667
path: artifacts
77-
merge-multiple: true
7868

7969
- name: List artifacts
8070
run: ls -la artifacts/

0 commit comments

Comments
 (0)