@@ -10,23 +10,7 @@ permissions:
1010
1111jobs :
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