Skip to content

Commit 93dc59a

Browse files
authored
fix release npm compatibility (#2190)
## Why The [v0.2.5 release run](https://github.com/voidzero-dev/vite-plus/actions/runs/29493170643) failed before publishing because `npm@latest` resolved to npm 12.0.1. npm 12.0.1 requires Node 22.22.2 or newer, while the workflow used Node 22.18.0. ## Changes - run the publishing job on Node 24.18.0, which bundles npm 11.16.0 - remove the separate global npm installation - add `workflow_dispatch` so the corrected v0.2.5 release can be started manually
1 parent b9acb2f commit 93dc59a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [main]
66
paths:
77
- 'packages/cli/package.json'
8+
workflow_dispatch:
89

910
permissions: {}
1011

@@ -14,7 +15,7 @@ env:
1415

1516
jobs:
1617
check:
17-
if: github.repository == 'voidzero-dev/vite-plus'
18+
if: github.repository == 'voidzero-dev/vite-plus' && github.ref == 'refs/heads/main'
1819
name: Check version
1920
runs-on: ubuntu-latest
2021
permissions:
@@ -73,7 +74,7 @@ jobs:
7374

7475
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
7576
with:
76-
node-version-file: .node-version
77+
node-version: '24.18.0'
7778
package-manager-cache: false
7879
registry-url: 'https://registry.npmjs.org'
7980

@@ -152,9 +153,6 @@ jobs:
152153
pattern: vp-release-archive-*
153154
merge-multiple: true
154155

155-
- name: 'Setup npm'
156-
run: npm install -g npm@latest
157-
158156
- name: Prepare and publish native addons
159157
run: node ./packages/cli/publish-native-addons.ts --mode npm
160158

0 commit comments

Comments
 (0)