From e3103e2528facf27c18e79eb6233168c510a7f70 Mon Sep 17 00:00:00 2001 From: voj-tech-j Date: Mon, 20 Apr 2026 13:50:56 +0200 Subject: [PATCH] fix(release): chain resolver + changeset publish via ci:publish script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit changesets/action `publish:` runs commands via exec (no shell), so multi-line YAML was flattened — node got `bunx changeset publish --tag snapshot` as ignored argv and the publish step never ran. Wrap the chain in a package.json script so the shell handles `&&`. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/release.yml | 12 +++++------- package.json | 3 ++- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f037f4..d7aedb9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,13 +43,11 @@ jobs: - name: Create Release PR or Publish uses: changesets/action@v1 with: - # Resolver MUST stay in `publish:`, not `version:` — `version:` edits - # are committed back to the Version Packages PR. The point is that - # repo source keeps `workspace:*` and only the publish runner sees - # the resolved ranges. - publish: | - node scripts/resolve-workspace-protocols.mjs - bunx changeset publish --tag snapshot + # `publish:` is exec'd directly (no shell), so chaining must live in + # the `ci:publish` script. It rewrites `workspace:*` on the runner, + # then invokes `changeset publish`. Keep it out of `version:` — those + # edits get committed back to the Version Packages PR. + publish: bun run ci:publish version: bunx changeset version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index b87efe9..90e705d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,8 @@ "workspaces": ["packages/*"], "scripts": { "build": "bun run --filter '*' build", - "test": "bun run --filter '*' test" + "test": "bun run --filter '*' test", + "ci:publish": "node scripts/resolve-workspace-protocols.mjs && bunx changeset publish --tag snapshot" }, "devDependencies": { "@changesets/cli": "^2.29.8"