mirror of
https://github.com/Canner/WrenAI.git
synced 2026-08-29 08:18:10 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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)"
|
||||
|
||||
Reference in New Issue
Block a user