Skip to content

Fix npm publishing using pnpm#138

Merged
Ryang-21 merged 1 commit intomasterfrom
fix-publishing-with-pnpm
Mar 6, 2026
Merged

Fix npm publishing using pnpm#138
Ryang-21 merged 1 commit intomasterfrom
fix-publishing-with-pnpm

Conversation

@Ryang-21
Copy link
Contributor

@Ryang-21 Ryang-21 commented Mar 6, 2026

  • add --no-git-checks to allow publishing from master

The npm-publish workflow triggers on GitHub Release events, which check out a Git tag rather than a branch. This results in a detached HEAD state, causing pnpm to fail with ERR_PNPM_GIT_UNKNOWN_BRANCH because it cannot determine the current branch.

--no-git-checks skips pnpm's pre-publish Git validations (branch name, clean working tree, up-to-date with remote). These checks are redundant in CI since the workflow already gates on a GitHub Release event and operates on a fresh checkout.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the npm publish GitHub Actions workflow to allow pnpm publish to run in CI environments where git state/branch checks can fail (e.g., detached HEAD during release workflows), while keeping provenance publishing enabled.

Changes:

  • Add --no-git-checks to the pnpm publish command in the release publishing workflow.
  • Minor formatting/indentation adjustment in the workflow permissions block.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ryang-21 Ryang-21 merged commit 952387b into master Mar 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants