ci(release): drop @semantic-release/git so releases work under branch protection#106
Merged
Conversation
Branch protection on main (required status checks) blocks the direct push that @semantic-release/git performs (changelog + version commit back to main), so releases failed after protection was enabled. Release now only tags + creates the GitHub Release (notes still generated) + builds the Docker image — no direct push to the protected branch, protection stays intact for Dependabot/PRs.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Contributor
|
🎉 This PR is included in version 1.9.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s semantic-release configuration to avoid committing back to the protected main branch, so scheduled/manual releases can succeed under required status checks while still producing tags and GitHub Releases.
Changes:
- Removed
@semantic-release/gitfrom the release pipeline to prevent direct pushes tomain. - Removed
@semantic-release/changelogsoCHANGELOG.mdis no longer generated/committed as part of releases.
| "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
| } | ||
| ], | ||
| "@semantic-release/github" |
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.
Problem
After enabling branch protection (required status checks) on
main, the nightly/dispatch release fails:@semantic-release/gitcommits CHANGELOG.md/package.json back tomainand pushes directly — which protection now rejects. Result: tags/images stop being produced (v1.9.0 release job failed).Fix
Remove
@semantic-release/git(and the now-orphaned@semantic-release/changelog). semantic-release still: analyses commits, generates release notes, creates the git tag + GitHub Release, and the workflow builds/pushes the Docker image. No direct push to the protected branch → protection stays fully intact for Dependabot/PRs.Tradeoff: CHANGELOG.md is no longer committed into the repo; release notes live in the GitHub Releases. Alternative (not chosen): a bypass PAT to keep the changelog commit.