fix: setup-node 24, fix repository.url, and bump actions to v6#417
Conversation
The GitHub Actions runner ships npm 10.9.8, which does not support tokenless Trusted Publishing (OIDC) auth. npm 11 is required. Without this, `npm publish --provenance` fails with ENEEDAUTH. Matches the working pattern from decentraland/marketplace. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test this pull request on NPM or Yarn
|
- Add actions/setup-node with node-version 24 (ships npm 11.x for Trusted Publishing OIDC support) - Replace npm@11 corepack workaround with proper Node 24 setup - Fix package.json repository field to full object format required for npm provenance verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
decentraland-bot
left a comment
There was a problem hiding this comment.
Code Review — PR #417
PR: fix: install npm@11 for Trusted Publishing OIDC auth
Branch: fix/install-npm11-for-trusted-publishing → experimental
Files changed: 2 (+8 −1)
CI: ✅ All checks passing
Summary
Follows up on PR #416 (OIDC migration). The ubuntu-latest runner ships npm 10.9.8, which doesn't support the tokenless OIDC token exchange needed for Trusted Publishing. This PR adds actions/setup-node@v4 with node-version: 24 (ships npm 11.x) to fix the ENEEDAUTH error. Also normalizes the package.json repository field to the standard object format.
Findings
No P0 or P1 issues found. ✅ Recommendation: APPROVE
[P2 — Minor] PR description doesn't match implementation
The PR body says it adds corepack install -g npm@11 && npm --version, but the actual implementation uses actions/setup-node@v4 with node-version: 24. The implementation is actually cleaner and more idiomatic — but the description should be updated for accuracy.
[P2 — Minor] Consider upgrading setup-node to v6
actions/setup-node is now at v6. While v4 works for installing Node 24 (CI confirms this), v4's own node20 runtime is being phased out. Consistent with the existing actions/checkout@v4 — both could be bumped together in a future housekeeping PR.
[P2 — Minor] Tag pinning vs SHA pinning
The new actions/setup-node@v4 uses a tag reference. Consistent with the repo's existing patterns (checkout@v4), but SHA pinning is the org security best practice. Non-blocking — can be addressed in a dedicated pinning sweep.
Pre-existing issues (not blocking this PR)
steps.myref.outputs.branchat line 51 (check_and_buildjob) references a step defined in thenotify_deploymentjob (line 81) — the S3 bucket key prefix will have an empty branch segment.notify_deploymentuses deprecated::set-outputsyntax (should migrate to$GITHUB_OUTPUT).peter-evans/find-comment@v1andcreate-or-update-comment@v1are significantly outdated.
Security
No security issues found in the changes introduced by this PR. OIDC permissions (id-token: write) were already correctly configured. No secrets added or exposed.
Consumer Impact
No public API surface changes. The package.json repository field is metadata-only and does not affect downstream consumers of @dcl/protocol.
Verdict
✅ APPROVE — No P0 or P1 issues. The change is minimal, correct, and well-targeted. The setup-node approach is cleaner than the corepack alternative mentioned in the description. CI passes.
⚠️ Unable to submit as formal approval because the bot account authored this PR. This review recommends approval.
Reviewed by Jarvis 🤖 · Requested by Charly via Slack
Both actions now use the node24 runtime, replacing the node20 runtime that is being phased out. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Update oddish-action to 0074f2d (OIDC/Trusted Publishing support) - Remove NODE_AUTH_TOKEN (use OIDC instead of invalid token) - Add actions/setup-node@v6 with node-version 24 (npm 11.x for OIDC) - Bump actions/checkout to v6 (node24 runtime) Replicates PRs #416 and #417 from the experimental branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change repository from shorthand "decentraland/protocol.git" to full object format required for npm provenance verification to match the GitHub origin. Replicates the package.json change from PR #417 (experimental branch). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
actions/setup-node@v6withnode-version: 24— Node 24 ships npm 11.x which supports tokenless Trusted Publishing (OIDC) auth. The workflow previously had nosetup-nodestep and relied on the runner default (Node 22 / npm 10.9.8, which does not support OIDC).package.jsonrepositoryfield from shorthand"decentraland/protocol.git"to full object format{"type": "git", "url": "git+https://github.com/decentraland/protocol.git"}— npm provenance verification requiresrepository.urlto match the GitHub origin.actions/checkoutandactions/setup-nodefrom v4 to v6 (node24 runtime, replacing the node20 runtime being phased out).Root cause
After PR #416 correctly switched to the OIDC-enabled oddish-action and removed
NODE_AUTH_TOKEN, the workflow takes the OIDC code path. However,npm publish --provenancefailed withENEEDAUTHbecause:package.jsonrepositoryfield was in shorthand format which may not resolve correctly for provenance verificationTest plan
experimentalbranch publish workflow succeedsnode --versionshows v24.x andnpm --versionshows 11.x in workflow logs@dcl/protocol@experimentalsnapshot is published to npm🤖 Generated with Claude Code