Skip to content

Commit 2bd7488

Browse files
ablaszkiewiczclaude
andcommitted
fix(ci): work around changesets/action cwd bug for cli release
changesets/action@v1's early "is there a .changeset directory?" check ignores its own \`cwd\` input and looks at the workspace root. Since ours lives at cli/.changeset/, the action errored out before doing anything useful. Workaround: symlink .changeset → cli/.changeset at the root in the workflow, and gitignore that root path so a slip-up never commits the symlink. version + publish still run with cwd=cli, so they see the real directory. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3411975 commit 2bd7488

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

‎.github/workflows/cli-release.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@ jobs:
4848
- name: Build
4949
run: pnpm build
5050

51+
# changesets/action@v1's early state check looks at the workspace root
52+
# for `.changeset/`, ignoring its own `cwd` input. We keep changesets in
53+
# cli/.changeset/, so symlink it at the root just to satisfy that check.
54+
# The symlink is gitignored (see /.gitignore) so the action's commit step
55+
# won't pick it up.
56+
- name: Symlink .changeset to root for changesets/action
57+
working-directory: ${{ github.workspace }}
58+
run: ln -s cli/.changeset .changeset
59+
5160
- name: Create release PR or publish to npm
5261
uses: changesets/action@v1
5362
with:

‎.gitignore‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
.cursor/
22
.security-audit/
3+
4+
# changesets/action's early state check ignores its own `cwd` input and looks
5+
# at the workspace root, so cli-release.yml symlinks .changeset → cli/.changeset
6+
# at the start of the run. This makes sure a slip-up never commits the symlink.
7+
/.changeset

0 commit comments

Comments
 (0)