fix(ci): split wasm RC publish into a token-based workflow#2240
Conversation
npm Trusted Publishing only allows one Trusted Publisher per package and the calling-workflow check breaks for reusable workflows: configuring the TP slot for release-please.yml's stable releases means RC dispatches from rc-release.yml fail validation. Move the wasm RC publish to a parallel reusable workflow, publish-wren-core-wasm-rc.yml, that authenticates with NPM_TOKEN. The existing publish-wren-core-wasm.yml stays as the OIDC variant used by release-please.yml. Python publishes are unchanged. Repo setup before merging: - Add an NPM_TOKEN secret with publish access to @wrenai/wren-core-wasm. - Update the npm Trusted Publisher Workflow filename from rc-release.yml to release-please.yml so the stable release path keeps working.
WalkthroughA new reusable GitHub Actions workflow publishes the ChangesRC Publish Workflow & Integration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In @.github/workflows/publish-wren-core-wasm-rc.yml:
- Around line 71-74: Replace the npm install invocation in the CI step named
"Install npm dependencies" (the step with working-directory: core/wren-core-wasm
and run: npm install) with a lockfile-strict install by using npm ci so the RC
publish uses the exact lockfile and avoids dependency drift.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cfcc49a1-a737-4741-91b0-a18895e7b14a
📒 Files selected for processing (2)
.github/workflows/publish-wren-core-wasm-rc.yml.github/workflows/rc-release.yml
Summary
npm Trusted Publishing has two constraints that conflict with our reusable-workflow setup:
npm publish.That means we have to choose which entrypoint owns the npm TP slot. We're keeping it for
release-please.yml(stable releases) and switchingrc-release.yml's wasm publish back to a classicNPM_TOKENflow.Changes
.github/workflows/publish-wren-core-wasm-rc.yml— same build pipeline as the OIDC variant but authenticates withNODE_AUTH_TOKENfromNPM_TOKEN. Noenvironment:, noid-token: write.rc-release.yml— thepublish-wren-core-wasmjob now calls the new RC workflow and forwardsNPM_TOKEN. Drops theid-token: writepermission since it's no longer needed for that path.publish-wren-core-wasm.yml(OIDC) — unchanged. Still used byrelease-please.yml.publish-wren-core-py.yml,publish-wren.yml) — unchanged.Required repo setup before merging
NPM_TOKENsecret (Settings → Secrets and variables → Actions) that has publish access to@wrenai/wren-core-wasm. A granular token scoped to that one package is the safest choice.@wrenai/wren-core-wasm:rc-release.yml→release-please.ymlAfter both are in place:
rc-release.ymlpublish withNPM_TOKEN.release-please.ymlcontinue to use OIDC Trusted Publishing.Test plan
NPM_TOKENsecret and update npm TP workflow filename.component=wren-core-wasmand confirm publish succeeds.wren-core-wasmshould still publish via OIDC.🤖 Generated with Claude Code
Summary by CodeRabbit