fix(ci): bump Node to 24 for npm Trusted Publishing + clearer manifest error

- npm Trusted Publishing requires Node.js >= 22.14.0 (per npm docs).
  Node 20 doesn't meet that, so bump the wasm publish workflow to Node 24.
  Keep the explicit 'npm install -g npm@latest' as a belt-and-suspenders
  guarantee for the npm >= 11.5.1 requirement.
- Replace the raw KeyError on a missing manifest path with an explicit
  sys.exit message so workflow failures are easier to triage.
This commit is contained in:
Jax Liu
2026-05-04 17:30:50 +08:00
parent e7026aeacd
commit b7037cb726
2 changed files with 5 additions and 2 deletions
+3 -2
View File
@@ -57,10 +57,11 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
# Trusted Publishing requires Node.js >= 22.14.0; pin to 24 (latest LTS line)
node-version: 24
registry-url: https://registry.npmjs.org
- name: Upgrade npm (Trusted Publishing requires >= 11.5.1)
- name: Ensure npm meets Trusted Publishing requirement (>= 11.5.1)
run: npm install -g npm@latest
- name: Install npm dependencies
+2
View File
@@ -76,6 +76,8 @@ jobs:
if path is None:
sys.exit(f\"component '{component}' not found in release-please-config.json\")
manifest = json.loads(os.environ['MANIFEST_JSON'])
if path not in manifest:
sys.exit(f\"path '{path}' for component '{component}' not in manifest\")
print(manifest[path])
")
echo "::notice::Base version for $COMPONENT: $BASE_VERSION (from $MANIFEST_SOURCE)"