Skip to content

fix(release): remove @semantic-release/git to avoid push on protected main#1

Merged
savez merged 3 commits intomainfrom
fix/release-protected-branch
Mar 20, 2026
Merged

fix(release): remove @semantic-release/git to avoid push on protected main#1
savez merged 3 commits intomainfrom
fix/release-protected-branch

Conversation

@savez
Copy link
Owner

@savez savez commented Mar 20, 2026

Summary

  • Removes @semantic-release/git plugin from .releaserc.json
  • This plugin attempted to push a chore(release): commit directly to main after each release, which is now blocked by branch protection requiring PRs + status checks
  • Semantic-release will still create git tags, publish to npm (with provenance), and create GitHub releases with full changelogs — only the CHANGELOG.md commit back to the repo is dropped

Why this is needed

Branch protection on main was enabled (requiring PR review + 2 passing CI checks before merge). The @semantic-release/git plugin pushes directly to main, which is now rejected, causing releases to fail.

Trade-offs

  • CHANGELOG.md will no longer be committed back into the repo after each release
  • Release notes are still fully generated and visible on GitHub Releases via @semantic-release/release-notes-generator + @semantic-release/github

Optional follow-up

To restore CHANGELOG.md commits: add the MACHINE_PAT token owner as a bypass actor in GitHub → Settings → Branches → Edit main protection rule → "Allow specified actors to bypass required pull requests", then re-add @semantic-release/git to .releaserc.json.

@github-actions
Copy link

Coverage Report

@github-actions
Copy link

github-actions bot commented Mar 20, 2026

QA Report

Check Status
🔍 Lint
🧪 Test & Coverage
🔐 Secrets Scan

Generated automatically by QA Workflow

@savez savez merged commit ee22cc5 into main Mar 20, 2026
4 checks passed
@savez
Copy link
Owner Author

savez commented Mar 20, 2026

🎉 This PR is included in version 1.0.0

@savez savez added the released label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant