Skip to content

Commit cbe6c14

Browse files
masseaterclaude
andcommitted
fix(ci): use npm publish -w to handle bun workspace context
npm publish from a subdirectory fails with ENOWORKSPACES in a bun workspace project. Using -w flag from root lets npm correctly identify and publish the target workspace package. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4df316e commit cbe6c14

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/publish-package.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ jobs:
8787
run: bunx turbo build --filter="./${WORKSPACE_DIR}"
8888

8989
- name: Publish to npm
90-
working-directory: ${{ steps.workspace.outputs.dir }}
91-
run: |
92-
npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
93-
npm publish --access public
9490
env:
9591
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
92+
WORKSPACE_DIR: ${{ steps.workspace.outputs.dir }}
93+
run: |
94+
npm config set "//registry.npmjs.org/:_authToken" "${NPM_TOKEN}"
95+
npm publish -w "./${WORKSPACE_DIR}" --access public
9696
9797
- name: Commit and tag
9898
run: |

0 commit comments

Comments
 (0)