Commit 0b93d1e
fix(release): drop @semantic-release/git to satisfy main branch protection (#175)
The release CI was failing on the `prepare` step because
`@semantic-release/git` does `git push --tags HEAD:main` to commit the
`chore(release): X.Y.Z [skip ci]` bump back to main, and main has a
branch protection rule that requires PRs.
Concrete failure observed on the release run for #174:
remote: error: GH013: Repository rule violations found for refs/heads/main.
remote: - Changes must be made through a pull request.
error: failed to push some refs to '.../deco-start.git'
pluginName: '@semantic-release/git'
Result: prepare aborts, publish never runs, npm stays on the previous
version, no GitHub release is created.
Drop the @semantic-release/git plugin. We keep:
- @semantic-release/commit-analyzer (decides the next version)
- @semantic-release/release-notes-generator (CHANGELOG body)
- @semantic-release/exec — `npm version ${version} --no-git-tag-version`
on prepare (mutates package.json *locally* in the runner before
publish) and `npm publish` on publish
- @semantic-release/github (GitHub release + tag)
What changes in practice:
- npm still publishes the correct version (exec.prepareCmd runs first)
- GitHub release and tag still created (@semantic-release/github)
- package.json on main is NOT auto-bumped after each release. Source of
truth for the current version becomes the git tag, not package.json.
- The "[skip ci]" suppression commit no longer happens — but the release
workflow only triggers on push to main/next, and the publish job is
the workflow itself, so there is no loop to suppress.
This is a deliberate tradeoff: keep the branch protection rule (which
is the intended safety net) and accept that package.json lags the tag.
Storefronts pin via npm version, so they're unaffected.
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>1 parent 8feed1a commit 0b93d1e
1 file changed
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
31 | 27 | | |
32 | 28 | | |
0 commit comments