Skip to content

Commit d144cd4

Browse files
authored
fix(ci): install @changesets/cli as workspace devDep (#11)
* fix(ci): install @changesets/cli as workspace devDep The release workflow's `changesets/action@v1` step resolves `@changesets/cli` from the workspace's node_modules before doing anything, so a global install via `npm install -g` lets the binary land on PATH but doesn't satisfy the action's preflight resolve. Symptom: every merge that *adds* a changeset (vs the follow-up Version Packages PR, which has no pending changesets and skips the action's open-version-PR branch) fails the Release job with: Error: Have you forgotten to install `@changesets/cli` in "/home/runner/work/managed-auth-react/managed-auth-react"? Fix: add `@changesets/cli` to the root devDependencies so it resolves from the workspace. Bun does create `node_modules/.bin/changeset` when it's a workspace dep, so the earlier "bun skips the .bin shim" workaround is no longer needed and the global-install step is dropped. * fix(ci): use bunx for changeset publish The publish input to changesets/action is passed to @actions/exec.getExecOutput, which does a PATH-based lookup — it does not search the workspace's node_modules/.bin. With the global install gone, `changeset publish` would no longer resolve. `bunx` explicitly resolves to the workspace devDep (verified: returns 2.31.0).
1 parent e42a234 commit d144cd4

3 files changed

Lines changed: 208 additions & 11 deletions

File tree

.github/workflows/release.yaml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,6 @@ jobs:
6464
- name: Install dependencies
6565
run: bun install --frozen-lockfile
6666

67-
# `bun install` skips the standard node_modules/.bin/changeset shim
68-
# that npm/pnpm/yarn create, so neither npx nor PATH-based lookups
69-
# find the binary. Installing @changesets/cli globally via npm gives
70-
# us a clean `changeset` on PATH for the action below. We keep using
71-
# bun for the workspace install so the project lockfile stays in use.
72-
- name: Install changesets CLI (global, for binary on PATH)
73-
run: npm install -g @changesets/cli
74-
7567
- name: Build package
7668
run: bun run --filter '@onkernel/managed-auth-react' build
7769

@@ -83,7 +75,7 @@ jobs:
8375
- name: Create release PR or publish
8476
uses: changesets/action@v1
8577
with:
86-
publish: changeset publish
78+
publish: bunx changeset publish
8779
title: "chore: version packages"
8880
commit: "chore: version packages"
8981
env:

0 commit comments

Comments
 (0)