fix(ci): bootstrap pnpm before setup-node in electron workflow (#1524)

setup-node@v4 with cache: pnpm needs pnpm on PATH before it runs, but
the workflow had it in the wrong order so the build failed on the first
push to dev after the electron shell landed. Matches the bootstrap
sequence already used in build-desktop.yml: pnpm first, then
setup-node@v6 using node-version-file: .nvmrc instead of a hardcoded
version.

Co-authored-by: Benjamin Shafii <benjamin@openworklabs.com>
This commit is contained in:
ben
2026-04-22 16:03:50 -07:00
committed by GitHub
parent 1dbc9f713c
commit a9fd83e669

View File

@@ -32,17 +32,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
# pnpm must be installed BEFORE setup-node so setup-node can find the
# pnpm binary on PATH. Matches the pattern in build-desktop.yml so
# the two workflows share the same bootstrap story.
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10.27.0
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
@@ -51,7 +53,7 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Package Electron desktop
- name: Package Electron desktop (unpacked)
run: pnpm --filter @openwork/desktop package:electron:dir
- name: Upload Electron artifacts