Skip to content

fix(ci): allow same-version npm bump in wasm publish workflows#2243

Merged
PaulChen79 merged 2 commits into
mainfrom
fix/wasm-publish-allow-same-version
May 5, 2026
Merged

fix(ci): allow same-version npm bump in wasm publish workflows#2243
PaulChen79 merged 2 commits into
mainfrom
fix/wasm-publish-allow-same-version

Conversation

@goldmedal
Copy link
Copy Markdown
Collaborator

@goldmedal goldmedal commented May 5, 2026

Summary

The release-please-driven stable publish failed at the Set version in package.json step:

```

  • npm version "0.2.0" --no-git-tag-version
    VERSION: 0.2.0
    npm error Version not changed
    ```

release-please-action bumps package.json as part of the release PR. Once that PR merges into main, the package.json version on main already matches the released tag, so npm version 0.2.0 errors out with "Version not changed".

Fix

Pass --allow-same-version so the bump is a no-op when the version already matches. Apply to both wasm publish workflows:

  • publish-wren-core-wasm.yml (OIDC, release-please) — directly fixes the failing path.
  • publish-wren-core-wasm-rc.yml (token, RC) — RC won't normally hit this since -rc.N versions always differ from main, but mirrors the change to keep the two pipelines in sync.

Test plan

  • Re-run the Release Please workflow (or the next merge that bumps wasm). Confirm Set version in package.json succeeds and npm publish follows.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Improved release automation to avoid failures when a package version is already set, making RC and stable releases more robust.
    • Updated the release manifest entry for the wasm package to adjust the recorded version mapping.

release-please updates package.json's version when its release PR is
merged, so by the time the publish workflow runs on main the version
already matches the release tag and 'npm version 0.2.0' fails with
'Version not changed'.

Pass --allow-same-version so the bump is a no-op when versions already
match. Apply to both the OIDC (release-please) and token-based (RC)
pipelines to keep them in sync.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0640da36-5b78-4903-96a9-4c126d54a038

📥 Commits

Reviewing files that changed from the base of the PR and between 4350739 and cde136f.

📒 Files selected for processing (1)
  • .release-please-manifest.json

Walkthrough

Workflows that set package.json version for wren-core-wasm now pass --allow-same-version to npm version to avoid failing when the file already matches the requested version. The release-please manifest mapping for core/wren-core-wasm was changed from 0.2.0 to 0.1.0.

Changes

Publish Workflow Changes

Layer / File(s) Summary
Control step update
.github/workflows/publish-wren-core-wasm.yml, .github/workflows/publish-wren-core-wasm-rc.yml
npm version "$VERSION" invocations now include --allow-same-version (and keep --no-git-tag-version in RC), with inline comments explaining release-please or OIDC behavior.

Release-Please Manifest Update

Layer / File(s) Summary
Manifest mapping
.release-please-manifest.json
core/wren-core-wasm version mapping changed from 0.2.00.1.0 (other entries unchanged).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Canner/WrenAI#2240: Modifies the same RC publish workflow’s npm version step.
  • Canner/WrenAI#2232: Edits the publish-wren-core-wasm workflow and related publish/auth logic.
  • Canner/WrenAI#2231: Changes release-please manifest handling and per-package version behavior.

Suggested labels

wasm

Suggested reviewers

  • PaulChen79
  • grieve54706

Poem

🐰 A tiny hop on release night’s lawn,
I add a flag so errors are gone,
If release-please already set the tune,
The publish step hums and finishes soon,
A cheerful thump, and the pipelines move on.

🚥 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 PR title clearly and specifically describes the main change: adding --allow-same-version to npm version commands in WASM publish workflows to handle cases where release-please has already bumped the version.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wasm-publish-allow-same-version

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 and usage tips.

@github-actions github-actions Bot added the ci label May 5, 2026
The 0.2.0 publish to npm never landed (the npm version step failed —
fixed in this PR), but release-please had already bumped the manifest
on PR merge. npm latest is still 0.1.0, so reset the manifest to match
reality. release-please will re-propose the 0.1.0 → 0.2.0 bump on the
next push to main.
@goldmedal goldmedal requested a review from PaulChen79 May 5, 2026 07:12
@PaulChen79 PaulChen79 merged commit cdf81ec into main May 5, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants