|
13 | 13 | description: Git tag to publish (e.g. v1.4.1) |
14 | 14 | required: true |
15 | 15 | type: string |
| 16 | + dry_run: |
| 17 | + description: Build all distributables but do not touch the GitHub release |
| 18 | + required: false |
| 19 | + default: false |
| 20 | + type: boolean |
16 | 21 |
|
17 | 22 | permissions: |
18 | 23 | contents: read |
@@ -44,22 +49,22 @@ jobs: |
44 | 49 | # smoke: run the compiled-sidecar smoke test on legs whose target |
45 | 50 | # matches the runner (the mac x64 leg cross-compiles on an arm64 |
46 | 51 | # runner, so its binary can't be executed natively there). |
47 | | - - os: macos-latest |
| 52 | + - os: blacksmith-6vcpu-macos-latest |
48 | 53 | arch: arm64 |
49 | 54 | platform: mac |
50 | 55 | bun-target: bun-darwin-arm64 |
51 | 56 | smoke: true |
52 | | - - os: macos-latest |
| 57 | + - os: blacksmith-6vcpu-macos-latest |
53 | 58 | arch: x64 |
54 | 59 | platform: mac |
55 | 60 | bun-target: bun-darwin-x64 |
56 | 61 | smoke: false |
57 | | - - os: ubuntu-latest |
| 62 | + - os: blacksmith-4vcpu-ubuntu-2404 |
58 | 63 | arch: x64 |
59 | 64 | platform: linux |
60 | 65 | bun-target: bun-linux-x64 |
61 | 66 | smoke: true |
62 | | - - os: windows-latest |
| 67 | + - os: blacksmith-8vcpu-windows-2025 |
63 | 68 | arch: x64 |
64 | 69 | platform: win |
65 | 70 | bun-target: bun-windows-x64 |
@@ -103,6 +108,30 @@ jobs: |
103 | 108 | with: |
104 | 109 | node-version: 24 |
105 | 110 |
|
| 111 | + - name: Cache Bun package cache |
| 112 | + uses: actions/cache@v4 |
| 113 | + with: |
| 114 | + path: ~/.bun/install/cache |
| 115 | + key: bun-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }} |
| 116 | + restore-keys: bun-cache-${{ runner.os }}-${{ runner.arch }}- |
| 117 | + |
| 118 | + # Electron's postinstall downloads a ~120MB runtime zip into this cache, |
| 119 | + # and electron-builder pulls its packaging tools (nsis, winCodeSign, |
| 120 | + # AppImage) into a sibling cache on first use. Both are keyed only by |
| 121 | + # version, so a lockfile-keyed cache stays warm across most releases. |
| 122 | + - name: Cache Electron downloads |
| 123 | + uses: actions/cache@v4 |
| 124 | + with: |
| 125 | + path: | |
| 126 | + ~/Library/Caches/electron |
| 127 | + ~/Library/Caches/electron-builder |
| 128 | + ~/.cache/electron |
| 129 | + ~/.cache/electron-builder |
| 130 | + ~/AppData/Local/electron/Cache |
| 131 | + ~/AppData/Local/electron-builder/Cache |
| 132 | + key: electron-cache-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }} |
| 133 | + restore-keys: electron-cache-${{ runner.os }}-${{ runner.arch }}- |
| 134 | + |
106 | 135 | - name: Install dependencies |
107 | 136 | run: bun install --frozen-lockfile |
108 | 137 |
|
@@ -215,6 +244,9 @@ jobs: |
215 | 244 |
|
216 | 245 | release: |
217 | 246 | needs: build |
| 247 | + # dry_run builds and uploads workflow artifacts but never touches the |
| 248 | + # GitHub release — used to rehearse workflow changes against a real tag. |
| 249 | + if: ${{ !inputs.dry_run }} |
218 | 250 | runs-on: blacksmith-4vcpu-ubuntu-2404 |
219 | 251 | permissions: |
220 | 252 | contents: write |
|
0 commit comments