Skip to content

ci(release): setup Node 24 + npm 11 for trusted publishing (OIDC)#12

Merged
SutuSebastian merged 3 commits into
mainfrom
ci/release-trusted-publishing
Jul 6, 2026
Merged

ci(release): setup Node 24 + npm 11 for trusted publishing (OIDC)#12
SutuSebastian merged 3 commits into
mainfrom
ci/release-trusted-publishing

Conversation

@SutuSebastian

@SutuSebastian SutuSebastian commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

The 0.2.0 publish failed with ENEEDAUTH — npm trusted publishing (OIDC) didn't engage. Root cause: release.yml used only oven-sh/setup-bun, leaving the runner's default npm 10.x in PATH. npm trusted publishing requires npm CLI ≥ 11.5.1 + Node ≥ 22.14 (npm docs); with npm 10.x, changeset publishnpm publish can't detect the OIDC environment and falls back to token auth (no token → ENEEDAUTH).

Fix: add actions/setup-node (Node 24 ships npm 11.x) before the changesets/action step. npm then auto-detects OIDC and authenticates via the trusted-publisher binding (verified correct on npmjs.com: stainless-code/persist + release.yml + release env). No NPM_TOKEN; provenance auto-generated. Matches the npm docs trusted-publishers example. Pinned by SHA for dependabot.

Fact-checked against official docs:

  • npm trusted-publishers: npm ≥ 11.5.1 + Node ≥ 22.14 required; provenance auto under trusted publishing (no --provenance/NPM_CONFIG_PROVENANCE needed).
  • changesets/action@a45c4d5 (pinned) has no oidcAuth input — trusted publishing is an npm-CLI feature, not an action feature.

Test plan

  • bun run format:check green on .github/workflows/release.yml
  • CI green on this PR (format/lint/typecheck/test/test-dom/build — no src/ change)
  • Merge → release.yml runs → npm publish 0.2.0 succeeds with provenance

Summary by CodeRabbit

  • Chores
    • Updated the release process to use a newer Node.js and npm setup for trusted publishing.
    • This helps keep package publishing compatible with the latest requirements.

npm trusted publishing requires npm CLI ≥ 11.5.1 + Node ≥ 22.14
(https://docs.npmjs.com/trusted-publishers). The release job used only
oven-sh/setup-bun, leaving the runner's default npm 10.x in PATH, so
`changeset publish` → `npm publish` couldn't detect the OIDC environment
and fell back to token auth → ENEEDAUTH (0.2.0 publish failed).

Add actions/setup-node (Node 24 ships npm 11.x) before the changesets
step. npm then auto-detects OIDC and authenticates via the trusted-
publisher binding — no NPM_TOKEN, provenance auto-generated. Matches the
npm docs trusted-publishers example. Pinned by SHA for dependabot.
@changeset-bot

changeset-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 461761e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@SutuSebastian, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 52 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e5b6b9be-600b-4606-be1f-88b3639d34fb

📥 Commits

Reviewing files that changed from the base of the PR and between 7445b04 and 461761e.

📒 Files selected for processing (3)
  • .github/workflows/release.yml
  • src/adapters/backends/compressed.test.ts
  • src/adapters/backends/encrypted.test.ts
📝 Walkthrough

Walkthrough

The release workflow now includes a step to set up Node.js 24 and npm registry configuration via actions/setup-node@v4, added before the trusted publishing step, with accompanying explanatory comments.

Changes

Release Workflow Update

Layer / File(s) Summary
Add Node.js setup for trusted publishing
.github/workflows/release.yml
Adds a step using actions/setup-node@v4 configured with node-version "24" and the npm registry URL, along with comments explaining the compatibility requirement.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding Node 24/npm 11 setup for OIDC trusted publishing in the release workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-trusted-publishing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

37-37: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update setup-node to v6. The current actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 pin is v4.4.0 and still runs on the deprecated Node 20 runtime, so this step will keep emitting deprecation warnings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml at line 37, Update the release workflow’s
setup-node action to the v6 release so it no longer runs on the deprecated Node
20 runtime and emits warnings. In the workflow step using actions/setup-node,
replace the current pinned v4 SHA with the v6 equivalent and keep the rest of
the job configuration unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/release.yml:
- Line 37: Update the release workflow’s setup-node action to the v6 release so
it no longer runs on the deprecated Node 20 runtime and emits warnings. In the
workflow step using actions/setup-node, replace the current pinned v4 SHA with
the v6 equivalent and keep the rest of the job configuration unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2e7bea55-e69a-42f2-b17f-83c535791525

📥 Commits

Reviewing files that changed from the base of the PR and between 1dde391 and 7445b04.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

The compressed + encrypted end-to-end tests waited only `setTimeout 0`
after `setState` before reading `memory.getItem(name)`. Both backends are
async (CompressionStream / crypto.subtle) and the subscribe-write settles
on a macrotask, so on CI the write hadn't landed yet → `memory.getItem`
returned null → `expect(...).toContain` threw "Received value must be an
array type". PR #7 passed by timing luck; PR #12's CI hit the race.

Replace the single `setTimeout 0` with a bounded macrotask poll until the
write lands in memory. Deterministic across runner speeds.
@SutuSebastian
SutuSebastian merged commit 27ab6b4 into main Jul 6, 2026
12 checks passed
@SutuSebastian
SutuSebastian deleted the ci/release-trusted-publishing branch July 6, 2026 11:13
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.

1 participant