Skip to content

Commit 0866bee

Browse files
committed
ci: move release actions off the deprecated Node 20 runtime
Every release run logs a Node 20 deprecation warning per step, and closes with: "The following actions target Node.js 20 but are being forced to run on Node.js 24: actions/cache@v4, actions/checkout@v4, actions/setup-node@v4, actions/upload-artifact@v4." Nothing is broken — GitHub is shimming them onto Node 24 — but the shim is temporary, so pin majors that target node24 natively: checkout v4 -> v7 setup-node v4 -> v7 cache v4 -> v6 upload-artifact v4 -> v7 download-artifact v4 -> v8 Node 24 actions require Actions Runner >= 2.327.1; the hosted images run 2.335.1 (per the v0.9.2 build log) and self-update, so nothing to do there. The majors were picked against how this workflow actually uses them, and each one's breaking change was checked rather than assumed: · setup-node v6 limits automatic caching to npm — this workflow never sets setup-node's `cache:` input (npm caching is the explicit actions/cache step), so it's a no-op here. · checkout v7 blocks fork checkouts for pull_request_target / workflow_run — neither is a trigger (tag push + workflow_dispatch). · upload-artifact v7's unzipped "direct uploads" are opt-in via `archive:`; the default still zips, so the .app.zip round-trip is unchanged. · download-artifact v8 now ERRORS on a digest mismatch instead of warning. Kept deliberately: a corrupted app bundle must not reach a release we then sign and notarize. A spurious failure is recoverable by re-running the job. Verified every input this workflow passes is still declared in the new majors (notably download-artifact's `merge-multiple`, which the draft-release job depends on), that all five now report `using: node24`, and that the YAML still parses with both matrix arches and triggers intact.
1 parent 7fd4786 commit 0866bee

1 file changed

Lines changed: 18 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,24 @@ on:
1919
permissions:
2020
contents: write # create/update the draft release
2121

22+
# Action pins run on the Node 24 runtime. GitHub deprecated Node 20 on the runners (2025-09-19) and
23+
# was force-running the old v4 pins on Node 24 with a warning per step; these majors target node24
24+
# natively, so the shim (and the warning) is gone. They need Actions Runner >= 2.327.1 — the hosted
25+
# images are well past that (2.335.1 as of the v0.9.2 build) and self-update, so no action needed.
26+
# The majors were chosen against how THIS workflow uses them, not blindly:
27+
# · setup-node v6 limited automatic caching to npm — not used here; npm caching is the explicit
28+
# actions/cache step below, so the change is a no-op for us.
29+
# · checkout v7 blocks fork checkouts for pull_request_target/workflow_run — neither is a trigger.
30+
# · upload-artifact v7 added unzipped "direct uploads" behind `archive:` — opt-in, default unchanged.
31+
# · download-artifact v8 now ERRORS on a digest mismatch (was a warning). Deliberate: a corrupted
32+
# app bundle must not reach a release we then sign and notarize. Recoverable by re-running the job.
2233
jobs:
2334
# Cheap gate: run the extension unit tests before spending ~1h of macOS build minutes.
2435
test:
2536
runs-on: ubuntu-latest
2637
steps:
27-
- uses: actions/checkout@v4
28-
- uses: actions/setup-node@v4
38+
- uses: actions/checkout@v7
39+
- uses: actions/setup-node@v7
2940
with:
3041
node-version: "24"
3142
- name: Extension unit tests
@@ -79,12 +90,12 @@ jobs:
7990
# the whole class of flake goes away. Same spirit as the GITHUB_TOKEN mitigation above.
8091
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
8192
steps:
82-
- uses: actions/checkout@v4
83-
- uses: actions/setup-node@v4
93+
- uses: actions/checkout@v7
94+
- uses: actions/setup-node@v7
8495
with:
8596
node-version: "24" # bootstrap.sh checks the .nvmrc major; 24.x satisfies the 1.126 pin
8697
- name: Cache npm downloads
87-
uses: actions/cache@v4
98+
uses: actions/cache@v6
8899
with:
89100
path: ~/.npm
90101
key: npm-${{ matrix.arch }}-${{ hashFiles('scripts/bootstrap.sh') }}
@@ -98,7 +109,7 @@ jobs:
98109
- name: Zip the unsigned app
99110
run: ditto -c -k --sequesterRsrc --keepParent "VSCode-darwin-${{ matrix.arch }}/LevelCode.app" "UNSIGNED-LevelCode-${{ matrix.arch }}.app.zip"
100111
- name: Upload app artifact
101-
uses: actions/upload-artifact@v4
112+
uses: actions/upload-artifact@v7
102113
with:
103114
name: UNSIGNED-LevelCode-${{ matrix.arch }}
104115
path: UNSIGNED-LevelCode-${{ matrix.arch }}.app.zip
@@ -111,7 +122,7 @@ jobs:
111122
if: startsWith(github.ref, 'refs/tags/')
112123
runs-on: ubuntu-latest
113124
steps:
114-
- uses: actions/download-artifact@v4
125+
- uses: actions/download-artifact@v8
115126
with:
116127
path: apps
117128
merge-multiple: true

0 commit comments

Comments
 (0)