Skip to content
TypeScript

perf(ci): reuse dependency checks in release builds (#9399)

Theo Brownefff33f9e8519
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8a5c691a3c7..9c179a770a2 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -111,6 +111,8 @@ jobs:
node-version-file: package.json
cache: true
run-install: true
+ env:
+ pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
- id: release_meta
name: Resolve release version
@@ -174,6 +176,14 @@ jobs:
--current-tag "${{ steps.release_meta.outputs.tag }}" \
--github-output
+ # Share only the verification results, not the large registry metadata cache.
+ - name: Upload dependency verification
+ continue-on-error: true
+ uses: actions/upload-artifact@v7
+ with:
+ name: release-dependency-verification
+ path: ${{ runner.temp }}/pnpm-metadata/lockfile-verified.jsonl
+
quality:
name: Release quality checks
needs: [preflight]
@@ -446,7 +456,18 @@ jobs:
path: ${{ steps.package_cache_path.outputs.path }}
key: windows-release-packages-v1-${{ matrix.arch }}-${{ hashFiles('pnpm-lock.yaml') }}
+ # pnpm checks the lockfile and policy before reusing this result. A missing
+ # artifact leaves the cache empty, so installation runs the checks again.
+ - name: Download dependency verification
+ continue-on-error: true
+ uses: actions/download-artifact@v8
+ with:
+ name: release-dependency-verification
+ path: ${{ runner.temp }}/pnpm-metadata
+
- name: Install desktop dependencies
+ env:
+ pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
run: vp install --filter=@t3tools/desktop... --filter=t3... --filter=@t3tools/scripts...
- name: Cache resource monitor
@@ -583,6 +604,7 @@ jobs:
- name: Build desktop artifact
shell: bash
env:
+ pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
T3CODE_DESKTOP_REUSE_RESOURCE_MONITOR: ${{ steps.resource_monitor_cache.outputs.cache-hit == 'true' }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
diff --git a/docs/internals/ci.md b/docs/internals/ci.md
index d67c9fbe081..a454e62c5c5 100644
--- a/docs/internals/ci.md
+++ b/docs/internals/ci.md
@@ -28,4 +28,9 @@ signing only when platform credentials are present. macOS passkey builds additio
`APPLE_TEAM_ID` and the `MACOS_PROVISIONING_PROFILE` secret; Windows uses Azure Trusted Signing.
Without the core signing credentials, it still releases unsigned artifacts.
+Preflight shares pnpm's lockfile verification results with the desktop build jobs through a small
+artifact. This avoids repeating dependency checks, especially on Windows, without transferring the
+large registry metadata cache. pnpm checks the current lockfile and policy before it reuses a result.
+If the artifact is unavailable, installation runs the checks again.
+
See [Release Checklist](../operations/release.md) for the full release/signing setup checklist.