From eeffbf0a736514ca1a4d1a62d0c461b65e32256e Mon Sep 17 00:00:00 2001 From: Neil <4138956+nwparker@users.noreply.github.com> Date: Sat, 25 Apr 2026 19:03:05 -0700 Subject: [PATCH] ci: cache pnpm store on release + centralize node version in .nvmrc (#1106) Co-authored-by: Orca --- .github/workflows/e2e.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release-cut.yml | 2 +- .github/workflows/release-rc.yml | 2 +- .github/workflows/release.yml | 12 +++++++----- .nvmrc | 1 + 6 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index af8eb7ac3f1..ed6217f75a8 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -33,7 +33,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 24 + node-version-file: .nvmrc - name: Setup pnpm uses: pnpm/action-setup@v4 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 893d5ae22fd..e52ff1bd920 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,7 +22,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 24 + node-version-file: .nvmrc - name: Setup pnpm uses: pnpm/action-setup@v4 diff --git a/.github/workflows/release-cut.yml b/.github/workflows/release-cut.yml index 9483ee5a995..5a45d9e242c 100644 --- a/.github/workflows/release-cut.yml +++ b/.github/workflows/release-cut.yml @@ -60,7 +60,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 24 + node-version-file: .nvmrc - name: Configure git author run: | diff --git a/.github/workflows/release-rc.yml b/.github/workflows/release-rc.yml index 4233431aff6..3641ba6faa6 100644 --- a/.github/workflows/release-rc.yml +++ b/.github/workflows/release-rc.yml @@ -40,7 +40,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: 24 + node-version-file: .nvmrc - name: Configure git author run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 35646f5eede..bb58505e72f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -104,16 +104,18 @@ jobs: with: ref: ${{ needs.resolve-release.outputs.ref }} - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 24 - + # pnpm must be on PATH before setup-node so setup-node can locate the store for caching. - name: Setup pnpm uses: pnpm/action-setup@v4 with: run_install: false + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: pnpm + # Why: pnpm install triggers electron's postinstall, which downloads the # Electron binary from GitHub release assets. GitHub's download CDN # occasionally returns 504s that fail the whole release. Retry on diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000000..a45fd52cc58 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +24