Skip to content

Commit eea93a9

Browse files
committed
desktop publish: blacksmith runners, bun/electron caches, dry-run input
1 parent fff7ed6 commit eea93a9

1 file changed

Lines changed: 36 additions & 4 deletions

File tree

‎.github/workflows/publish-desktop.yml‎

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ on:
1313
description: Git tag to publish (e.g. v1.4.1)
1414
required: true
1515
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
1621

1722
permissions:
1823
contents: read
@@ -44,22 +49,22 @@ jobs:
4449
# smoke: run the compiled-sidecar smoke test on legs whose target
4550
# matches the runner (the mac x64 leg cross-compiles on an arm64
4651
# runner, so its binary can't be executed natively there).
47-
- os: macos-latest
52+
- os: blacksmith-6vcpu-macos-latest
4853
arch: arm64
4954
platform: mac
5055
bun-target: bun-darwin-arm64
5156
smoke: true
52-
- os: macos-latest
57+
- os: blacksmith-6vcpu-macos-latest
5358
arch: x64
5459
platform: mac
5560
bun-target: bun-darwin-x64
5661
smoke: false
57-
- os: ubuntu-latest
62+
- os: blacksmith-4vcpu-ubuntu-2404
5863
arch: x64
5964
platform: linux
6065
bun-target: bun-linux-x64
6166
smoke: true
62-
- os: windows-latest
67+
- os: blacksmith-8vcpu-windows-2025
6368
arch: x64
6469
platform: win
6570
bun-target: bun-windows-x64
@@ -103,6 +108,30 @@ jobs:
103108
with:
104109
node-version: 24
105110

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+
106135
- name: Install dependencies
107136
run: bun install --frozen-lockfile
108137

@@ -215,6 +244,9 @@ jobs:
215244

216245
release:
217246
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 }}
218250
runs-on: blacksmith-4vcpu-ubuntu-2404
219251
permissions:
220252
contents: write

0 commit comments

Comments
 (0)