Skip to content

fix: publish workflow blocked by branch protection#128

Closed
TaprootFreak wants to merge 1 commit intodevelopfrom
fix/publish-workflow
Closed

fix: publish workflow blocked by branch protection#128
TaprootFreak wants to merge 1 commit intodevelopfrom
fix/publish-workflow

Conversation

@TaprootFreak
Copy link
Contributor

Summary

  • Add --no-push to lerna version to prevent direct push to protected branch
  • Push only tags separately with git push origin --tags
  • Add fetch-depth: 0 for proper conventional commit history analysis

Context

The publish workflow fails with GH013: Repository rule violations found for refs/heads/develop because lerna version tries to push the version commit directly to the protected develop branch. With --no-push, lerna creates the version commit and tags locally, then we push only the tags (which aren't subject to branch protection). lerna publish from-git then publishes based on those tags.

Test plan

  • Merge this PR and verify the publish workflow succeeds on develop
  • Verify npm packages are published with correct beta versions
  • Verify git tags are created on the remote

lerna version tries to push directly to the protected develop/main
branch, which is blocked by repository rulesets (GH013). Use --no-push
and push only tags separately, then publish from-git as before.
Also add fetch-depth: 0 for proper conventional commit analysis.
@TaprootFreak TaprootFreak deleted the fix/publish-workflow branch February 18, 2026 15:08
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.

1 participant