Skip to content

Commit 0b93d1e

Browse files
JonasJesus42claude
andauthored
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

File tree

.releaserc.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
"prepareCmd": "npm version ${nextRelease.version} --no-git-tag-version",
2424
"publishCmd": "npm publish --access public --tag ${nextRelease.channel}"
2525
}],
26-
"@semantic-release/github",
27-
["@semantic-release/git", {
28-
"assets": ["package.json"],
29-
"message": "chore(release): ${nextRelease.version} [skip ci]"
30-
}]
26+
"@semantic-release/github"
3127
]
3228
}

0 commit comments

Comments
 (0)