From 8d2e0de2e0b652facf8c3b8f06876895778aa1bc Mon Sep 17 00:00:00 2001 From: Andrew Thal <467872+athal7@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:08:09 -0500 Subject: [PATCH] fix(ci): stop committing package.json/package-lock.json version bumps back to the repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @semantic-release/git committed the npm-bumped package.json/package-lock.json back to main on every release (no PR, but still a committed version file). Explicit preference across every tap repo: no committed version file, ever. npm publish still gets the correct version — @semantic-release/npm sets it in this CI checkout before publishing regardless of whether anything commits it back; only the repo's own committed package.json now lags the last manually-set value instead of tracking every release. --- .releaserc.cjs | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.releaserc.cjs b/.releaserc.cjs index 0e9189c..62ced2b 100644 --- a/.releaserc.cjs +++ b/.releaserc.cjs @@ -19,19 +19,16 @@ module.exports = { // Generate release notes '@semantic-release/release-notes-generator', - // Update version in package.json and publish to npm with provenance + // Publish to npm with provenance. package.json's committed version + // stays a placeholder (0.0.0-development) — semantic-release sets + // the real version only in this ephemeral CI checkout before + // `npm publish`, and never commits it back to the repo. No PR, no + // committed version file, ever; the npm registry and git tags are + // the only sources of truth for the release version. ['@semantic-release/npm', { provenance: true }], - - // Commit the version changes - [ - '@semantic-release/git', - { - assets: ['package.json', 'package-lock.json'], - message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}' - } - ], - - // Create GitHub release + + // Create GitHub release directly from HEAD's tree (no version-bump + // commit precedes it) '@semantic-release/github' ] };