Skip to content

ci: fix release workflow failing on multi-package bumps - #439

Merged
kibertoad merged 2 commits into
mainfrom
fix/release-workflow-pnpm-version
May 18, 2026
Merged

ci: fix release workflow failing on multi-package bumps#439
kibertoad merged 2 commits into
mainfrom
fix/release-workflow-pnpm-version

Conversation

@kibertoad

@kibertoad kibertoad commented May 18, 2026

Copy link
Copy Markdown
Owner

Summary

The latest release run (26020816084) failed at the Bump versions for changed packages step with:

[ERR_PNPM_UNCLEAN_WORKING_TREE] Working tree is not clean. Commit or stash your changes.

pnpm version runs a clean-tree check independent of --no-git-tag-version, so once the first package bump dirties the tree, every subsequent bump in the loop fails. pnpm exposes --no-git-checks as the documented escape hatch for this.

  • Add --no-git-checks to the per-package pnpm version call to bypass the clean-tree check.
  • Disable actions/setup-node's automatic package-manager caching on the release job (package-manager-cache: false). The release job is a one-shot publish — caching adds noise without benefit, and v6 of setup-node enables it by default whenever `packageManager` is set in `package.json`.

Test plan

  • Merge and confirm the next qualifying PR triggers a successful publish run that bumps multiple packages in a single matrix.

🤖 Generated with Claude Code

pnpm 11 enforces a clean working tree in `pnpm version` even with
`--no-git-tag-version`, so the loop fails on the second package once the
first bump dirties the tree. Switch to `npm version`, which respects the
flag correctly.

Also disable setup-node's automatic package-manager caching on the
release job — caches are unnecessary for the one-shot publish run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The publish workflow is updated to address pnpm 11 compatibility issues. Package manager caching is explicitly disabled in the Node setup step, and the per-package version bump command switches from pnpm to npm to avoid working tree cleanliness constraints encountered when bumping multiple packages.

Changes

Publish workflow CI/CD fixes

Layer / File(s) Summary
Node setup cache configuration
.github/workflows/publish.yml
actions/setup-node explicitly disables package-manager-cache to ensure a clean environment for the publish workflow.
Version bump mechanism
.github/workflows/publish.yml
Per-package version bumping switches from pnpm version to npm version --no-git-tag-version to avoid pnpm 11's enforcement of a clean working tree when bumping multiple packages sequentially.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested labels

patch

Suggested reviewers

  • CarlosGamero

Poem

A rabbit hops through workflows with care,
Disabling caches in the publish air,
From pnpm back to npm's embrace,
Keeping trees clean in their rightful place! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: fixing the release workflow's failure when bumping multiple packages. It is specific, directly related to the changeset, and avoids vague language.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-workflow-pnpm-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.

Stick with pnpm version and use its built-in --no-git-checks flag to
bypass the clean-tree check, which is the documented escape hatch for
this exact scenario.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kibertoad
kibertoad merged commit f1090ec into main May 18, 2026
7 of 8 checks passed
@kibertoad
kibertoad deleted the fix/release-workflow-pnpm-version branch May 18, 2026 08:09
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.

1 participant