Skip to content

Commit bfe19b5

Browse files
t3dotggrynfar
authored andcommitted
perf(ci): reuse dependency checks in release builds (#9399)
(cherry picked from commit fff33f9e851912363c5b1f3ac65598be35eb5f0d)
1 parent 44b1a9b commit bfe19b5

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ jobs:
140140
node-version-file: package.json
141141
cache: true
142142
run-install: true
143+
env:
144+
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
143145

144146
- id: release_meta
145147
name: Resolve release version
@@ -203,6 +205,14 @@ jobs:
203205
--current-tag "${{ steps.release_meta.outputs.tag }}" \
204206
--github-output
205207
208+
# Share only the verification results, not the large registry metadata cache.
209+
- name: Upload dependency verification
210+
continue-on-error: true
211+
uses: actions/upload-artifact@v7
212+
with:
213+
name: release-dependency-verification
214+
path: ${{ runner.temp }}/pnpm-metadata/lockfile-verified.jsonl
215+
206216
quality:
207217
name: Release quality checks
208218
needs: [preflight]
@@ -516,7 +526,18 @@ jobs:
516526
path: ${{ steps.package_cache_path.outputs.path }}
517527
key: windows-release-packages-v1-${{ matrix.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
518528

529+
# pnpm checks the lockfile and policy before reusing this result. A missing
530+
# artifact leaves the cache empty, so installation runs the checks again.
531+
- name: Download dependency verification
532+
continue-on-error: true
533+
uses: actions/download-artifact@v8
534+
with:
535+
name: release-dependency-verification
536+
path: ${{ runner.temp }}/pnpm-metadata
537+
519538
- name: Install desktop dependencies
539+
env:
540+
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
520541
run: vp install --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
521542

522543
- name: Cache resource monitor
@@ -674,6 +695,7 @@ jobs:
674695
# release job actually publishes, or builds go looking in the wrong
675696
# place forever. Falls back to this repository when unset.
676697
PYLON_DESKTOP_UPDATE_REPOSITORY: ${{ vars.PYLON_DESKTOP_UPDATE_REPOSITORY }}
698+
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
677699
T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: ${{ steps.resource_monitor_cache.outputs.cache-hit == 'true' }}
678700
CSC_LINK: ${{ secrets.CSC_LINK }}
679701
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}

docs/internals/ci.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,9 @@ signing only when platform credentials are present. macOS passkey builds additio
2727
`APPLE_TEAM_ID` and the `MACOS_PROVISIONING_PROFILE` secret; Windows uses Azure Trusted Signing.
2828
Without the core signing credentials, it still releases unsigned artifacts.
2929

30+
Preflight shares pnpm's lockfile verification results with the desktop build jobs through a small
31+
artifact. This avoids repeating dependency checks, especially on Windows, without transferring the
32+
large registry metadata cache. pnpm checks the current lockfile and policy before it reuses a result.
33+
If the artifact is unavailable, installation runs the checks again.
34+
3035
See [Release Checklist](../operations/release.md) for the full release/signing setup checklist.

0 commit comments

Comments
 (0)