Skip to content

ci: drop @semantic-release/git to work with protected main - #12

Merged
M-kasinski merged 1 commit into
mainfrom
ci/drop-semantic-release-git
Jul 16, 2026
Merged

ci: drop @semantic-release/git to work with protected main#12
M-kasinski merged 1 commit into
mainfrom
ci/drop-semantic-release-git

Conversation

@M-kasinski

Copy link
Copy Markdown
Collaborator

What

Remove @semantic-release/git (and @semantic-release/changelog) from the release config.

Why

@semantic-release/git pushes a chore(release) commit directly to main, which the branch protection ruleset rejects:

GH013: Repository rule violations found for refs/heads/main — Changes must be made through a pull request.

This runs in the prepare phase, before publish, so it aborted the release before npm publish ever ran (nothing was published, no tag created).

Effect

semantic-release still:

  • publishes to npm (via OIDC trusted publishing),
  • pushes the vX.Y.Z tag,
  • creates the GitHub Release with generated notes.

Dropped: the committed CHANGELOG.md and the in-repo package.json version bump. The GitHub Releases page is the source of truth for release notes.

After merge

Pushing this to main triggers a release that should publish 1.0.0 (a BREAKING CHANGE is pending since v0.1.0).

🤖 Generated with Claude Code

The @semantic-release/git plugin pushes a release commit directly to
main, which the branch protection ruleset rejects ("changes must be
made through a pull request"), aborting the release before npm publish.

Remove it (and @semantic-release/changelog, whose output was only ever
persisted by the git plugin). semantic-release still publishes to npm,
pushes the version tag, and creates the GitHub Release with notes. The
committed CHANGELOG.md and in-repo version bump are dropped; the GitHub
Releases page is the source of truth for release notes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@M-kasinski
M-kasinski merged commit 6bad4ac into main Jul 16, 2026
1 check passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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