github deprecated using node 20 for actions
Massimo Melina committed
Apr 21, 2026 at 00:33 UTC
60734cf5fc002580ee490aca3c6e2b6af0eca342
3 files changed
+20
-6
.github/workflows/playwright.yml.disabled
+1
-1
@@ -12,7 +12,7 @@ jobs:
12
- uses: actions/checkout@v4
13
- uses: actions/setup-node@v4
14
with:
15
- node-version: lts/*
15
+ node-version: 22
16
- name: Install dependencies
17
run: npm ci
18
- name: Install Playwright Browsers
.github/workflows/release-assets.yml
+2
-3
@@ -18,7 +18,7 @@ on:
18
type: string
19
20
env:
21
- NODE_VERSION: '20'
21
+ NODE_VERSION: '22'
22
23
jobs:
24
windows:
@@ -44,12 +44,11 @@ jobs:
44
throw "Unsupported pkg target format: $target"
45
}
46
"target=$target" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
47
- "node_major=$($matches[1])" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
47
48
- name: Setup Node
49
uses: actions/setup-node@v4
50
with:
52
- node-version: ${{ steps.pkg_target.outputs.node_major }}
51
+ node-version: ${{ env.NODE_VERSION }}
52
cache: npm
53
54
- name: Install dependencies
.github/workflows/signpath-windows.yml
+17
-2
@@ -9,11 +9,26 @@ jobs:
9
permissions:
10
contents: read
11
env:
12
- NODE_VERSION: '20'
12
+ NODE_VERSION: '22'
13
steps:
14
- name: Checkout
15
uses: actions/checkout@v4
16
17
+ - name: Resolve Windows pkg target
18
+ id: pkg_target
19
+ shell: pwsh
20
+ run: |
21
+ # keep workflow and package.json aligned by deriving the Windows pkg target from a single source of truth
22
+ $pkg = Get-Content package.json -Raw | ConvertFrom-Json
23
+ $target = @($pkg.pkg.targets) | Where-Object { $_ -match '-win-x64$' } | Select-Object -First 1
24
+ if (-not $target) {
25
+ throw "No Windows pkg target (-win-x64) found in package.json"
26
+ }
27
+ if ($target -notmatch '^node(\d+)-') {
28
+ throw "Unsupported pkg target format: $target"
29
+ }
30
+ "target=$target" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
31
+
32
- name: Setup Node
33
uses: actions/setup-node@v4
34
with:
@@ -35,7 +50,7 @@ jobs:
50
- name: Build Windows binary
51
run: |
52
cd dist
38
- npx pkg . --public -C gzip -t node${{ env.NODE_VERSION }}-win-x64
53
+ npx pkg . --public -C gzip -t ${{ steps.pkg_target.outputs.target }}
54
npx resedit-cli --in hfs.exe --icon 1,../hfs.ico --out hfs.exe
55
56
- name: Prepare unsigned artifact folder