From 39d8f846fedce797aecf141633089f2346a911ab Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Mon, 18 May 2026 11:04:44 +0300 Subject: [PATCH 1/2] ci: fix release workflow failing on multi-package bumps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .github/workflows/publish.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 522f4fa9..80773467 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -300,7 +300,7 @@ jobs: with: node-version: 24.x registry-url: 'https://registry.npmjs.org' - cache: 'pnpm' + package-manager-cache: false - name: Install dependencies run: pnpm install --frozen-lockfile --ignore-scripts @@ -323,7 +323,10 @@ jobs: echo "Bumping version for $PKG_NAME..." cd "packages/$PKG_NAME" OLD_VERSION=$(node -p "require('./package.json').version") - pnpm version "$BUMP" --no-git-tag-version + # Use npm version (not pnpm version) — pnpm 11 enforces a clean + # working tree even with --no-git-tag-version, which breaks after + # the first package bump dirties the tree. + npm version "$BUMP" --no-git-tag-version NEW_VERSION=$(node -p "require('./package.json').version") echo " $OLD_VERSION -> $NEW_VERSION" From f0744021c7d61731f4d0dceb571d90c8afa20ffa Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Mon, 18 May 2026 11:07:52 +0300 Subject: [PATCH 2/2] ci: pass --no-git-checks to pnpm version instead of switching to npm 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) --- .github/workflows/publish.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 80773467..4da12fc7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -323,10 +323,10 @@ jobs: echo "Bumping version for $PKG_NAME..." cd "packages/$PKG_NAME" OLD_VERSION=$(node -p "require('./package.json').version") - # Use npm version (not pnpm version) — pnpm 11 enforces a clean - # working tree even with --no-git-tag-version, which breaks after - # the first package bump dirties the tree. - npm version "$BUMP" --no-git-tag-version + # --no-git-checks: skip pnpm's clean-tree check, which would + # otherwise fail on the second iteration once the first bump + # dirties the tree. + pnpm version "$BUMP" --no-git-tag-version --no-git-checks NEW_VERSION=$(node -p "require('./package.json').version") echo " $OLD_VERSION -> $NEW_VERSION"