ci: use pnpm in publish workflow and tolerate missing husky#1450
Merged
AbhiPrasad merged 1 commit intomainfrom Feb 27, 2026
Merged
ci: use pnpm in publish workflow and tolerate missing husky#1450AbhiPrasad merged 1 commit intomainfrom
AbhiPrasad merged 1 commit intomainfrom
Conversation
The publish workflow failed because `npm install` triggered the root prepare script which runs `husky`, but husky wasn't installed in CI. Switch all npm commands to pnpm for consistency with the rest of the repo, and make the prepare script tolerate missing husky. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
cpinn
reviewed
Feb 27, 2026
| if [ -n "${CI:-}" ] || [ -n "${GITHUB_ACTIONS:-}" ]; then | ||
| # Running in CI - publish without confirmation | ||
| npm publish --tag "$DIST_TAG" | ||
| pnpm publish --tag "$DIST_TAG" --no-git-checks |
Contributor
There was a problem hiding this comment.
whats the need for the no-git-checks seems like we might want that setting?
Member
Author
There was a problem hiding this comment.
good catch, that was just AI sneaking it in. I'll fix.
Member
Author
There was a problem hiding this comment.
It seems this is needed for pnpm specifically, pnpm has extra safety checks for publishing.
In CI,
actions/checkoutchecks out a detached HEAD (not a named branch), so pnpm's default check — "are you on the publish branch (main)?" — fails. For prereleases, the script also modifiespackage.jsonwithout committing, which fails the "clean working tree" check.--no-git-checksskips both.
cpinn
approved these changes
Feb 27, 2026
AbhiPrasad
added a commit
that referenced
this pull request
Feb 27, 2026
Reverts the publish-related changes from #1450 and #1451, restoring npm for the publish workflow and scripts while keeping the husky || true fix. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
AbhiPrasad
added a commit
that referenced
this pull request
Feb 27, 2026
Reverts the publish-related changes from #1450 and #1451, restoring npm for the publish workflow and scripts while keeping the husky || true fix. pnpm publish has a ton of drawbacks compared to using plain npm. Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npmtopnpmfor consistency with the rest of the repopnpm/action-setup@v4to the publish CI workflow (replacingnpm install -g [email protected])preparescript tolerate missinghusky(husky || true)Fixes the failed publish run: https://github.com/braintrustdata/braintrust-sdk-javascript/actions/runs/22496559262/job/65172571387
Test plan
pnpm installstill runs husky prepare successfully🤖 Generated with Claude Code