Skip to content
Source
Sign inSign up
pingdotgg/t3code

ci(release): desktop builds stop hitting the npm registry for staged installs #26458

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/26458/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 1 changed file with 47 additions and 1 deletion.

x
0 of 1 viewed, 1 left
47 additions and 1 deletion.github/workflows/release-desktop.ymlModified
View file
@@ -163,6 +163,29 @@
env:
pnpm_config_cache_dir: ${{ runner.temp }}/pnpm-metadata
​
+ # The CLI archive and the staged app install without a lockfile, so they
+ # ask the registry about every package and fetch platform packages the
+ # workspace store lacks. They share this registry metadata and store. A
+ # new week starts cold, which bounds how stale cached ranges can get.
+ - name: Resolve staged install cache
+ id: stage_pnpm
+ shell: bash
+ run: |
+ echo "dir=$RUNNER_TEMP/desktop-stage-pnpm" >> "$GITHUB_OUTPUT"
+ echo "prefix=desktop-stage-pnpm-v2-${{ inputs.platform }}-${{ inputs.arch }}-$(date -u +%G-%V)-" >> "$GITHUB_OUTPUT"
+​
+ - name: Restore staged install cache
+ id: stage_pnpm_cache
+ uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
+ with:
+ path: ${{ steps.stage_pnpm.outputs.dir }}
+ key: ${{ steps.stage_pnpm.outputs.prefix }}${{ github.run_id }}-${{ github.run_attempt }}
+ restore-keys: ${{ steps.stage_pnpm.outputs.prefix }}
+​
+ - name: Mark staged install cache
+ shell: bash
+ run: mkdir -p "${{ steps.stage_pnpm.outputs.dir }}" && touch "$RUNNER_TEMP/desktop-stage-pnpm.marker"
+​
- name: Cache resource monitor
id: resource_monitor_cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6