Skip to content

fix: setup-node 24, fix repository.url, and bump actions to v6#417

Merged
charly-bg merged 3 commits into
experimentalfrom
fix/install-npm11-for-trusted-publishing
Jun 8, 2026
Merged

fix: setup-node 24, fix repository.url, and bump actions to v6#417
charly-bg merged 3 commits into
experimentalfrom
fix/install-npm11-for-trusted-publishing

Conversation

@decentraland-bot

@decentraland-bot decentraland-bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add actions/setup-node@v6 with node-version: 24 — Node 24 ships npm 11.x which supports tokenless Trusted Publishing (OIDC) auth. The workflow previously had no setup-node step and relied on the runner default (Node 22 / npm 10.9.8, which does not support OIDC).
  • Fix package.json repository field from shorthand "decentraland/protocol.git" to full object format {"type": "git", "url": "git+https://github.com/decentraland/protocol.git"} — npm provenance verification requires repository.url to match the GitHub origin.
  • Bump actions/checkout and actions/setup-node from 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 --provenance failed with ENEEDAUTH because:

  1. The runner's default npm 10.x doesn't support the OIDC token exchange for Trusted Publishing
  2. The package.json repository field was in shorthand format which may not resolve correctly for provenance verification

Test plan

  • Merge this PR and verify the experimental branch publish workflow succeeds
  • Confirm node --version shows v24.x and npm --version shows 11.x in workflow logs
  • Confirm @dcl/protocol@experimental snapshot is published to npm
  • Verify provenance attestation is attached to the published package

🤖 Generated with Claude Code

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>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Test this pull request on NPM or Yarn

  • The @dcl/protocol package can be tested in scenes by running the following NPM command:
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-27167638173.commit-d3552ac.tgz"
  • The @dcl/protocol package can be tested in scenes by running the following YARN command:
    yarn add "https://sdk-team-cdn.decentraland.org/@dcl/protocol/branch//dcl-protocol-1.0.0-27167638173.commit-d3552ac.tgz"

- 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 decentraland-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review — PR #417

PR: fix: install npm@11 for Trusted Publishing OIDC auth
Branch: fix/install-npm11-for-trusted-publishingexperimental
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.branch at line 51 (check_and_build job) references a step defined in the notify_deployment job (line 81) — the S3 bucket key prefix will have an empty branch segment.
  • notify_deployment uses deprecated ::set-output syntax (should migrate to $GITHUB_OUTPUT).
  • peter-evans/find-comment@v1 and create-or-update-comment@v1 are 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>
@decentraland-bot decentraland-bot changed the title fix: install npm@11 for Trusted Publishing OIDC auth fix: setup-node 24, fix repository.url, and bump actions to v6 Jun 8, 2026
@charly-bg
charly-bg merged commit a470b13 into experimental Jun 8, 2026
3 checks passed
@charly-bg
charly-bg deleted the fix/install-npm11-for-trusted-publishing branch June 8, 2026 21:22
decentraland-bot added a commit that referenced this pull request Jun 9, 2026
- 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>
decentraland-bot added a commit that referenced this pull request Jun 9, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants