fix: publish workflow blocked by branch protection#128
Closed
TaprootFreak wants to merge 1 commit intodevelopfrom
Closed
fix: publish workflow blocked by branch protection#128TaprootFreak wants to merge 1 commit intodevelopfrom
TaprootFreak wants to merge 1 commit intodevelopfrom
Conversation
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.
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
--no-pushtolerna versionto prevent direct push to protected branchgit push origin --tagsfetch-depth: 0for proper conventional commit history analysisContext
The publish workflow fails with
GH013: Repository rule violations found for refs/heads/developbecauselerna versiontries 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-gitthen publishes based on those tags.Test plan