Skip to content

Commit 46da72a

Browse files
t3dotggclaude
andcommitted
ci(release): save the Node.js download right after it verifies
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent bf46fb7 commit 46da72a

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎.github/workflows/release-desktop.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,10 +262,10 @@ jobs:
262262

263263
# The download only changes with engines.node, so a cached copy keeps
264264
# releases off nodejs.org, which stalls on the runners some days.
265-
- name: Cache target Node.js for the CLI executable
265+
- name: Restore target Node.js for the CLI executable
266266
id: target_node_cache
267267
if: inputs.cli_archive && inputs.platform == 'win'
268-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
268+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
269269
with:
270270
path: ${{ runner.temp }}/node-download
271271
key: node-download-v${{ steps.target_node.outputs.version }}-win-${{ inputs.arch }}
@@ -287,6 +287,15 @@ jobs:
287287
fetch=(curl -fsSL --retry 5 --retry-all-errors --connect-timeout 10 --speed-limit 102400 --speed-time 30)
288288
"${fetch[@]}" -o "$dir/$name.zip" "https://nodejs.org/dist/v$VERSION/$name.zip"
289289
"${fetch[@]}" -o "$dir/SHASUMS256.txt" "https://nodejs.org/dist/v$VERSION/SHASUMS256.txt"
290+
(cd "$dir" && grep " $name.zip\$" SHASUMS256.txt | sha256sum -c -)
291+
292+
# Saved right away so a later failure in this job still keeps the download.
293+
- name: Save target Node.js for the CLI executable
294+
if: inputs.cli_archive && inputs.platform == 'win' && steps.target_node_cache.outputs.cache-hit != 'true'
295+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
296+
with:
297+
path: ${{ runner.temp }}/node-download
298+
key: ${{ steps.target_node_cache.outputs.cache-primary-key }}
290299

291300
- name: Install target Node.js for the CLI executable
292301
if: inputs.cli_archive && inputs.platform == 'win'

0 commit comments

Comments
 (0)