Skip to content

ci(release): make publish version step idempotent#4

Merged
Tam2 merged 1 commit into
mainfrom
fix/release-version-idempotent
Jul 15, 2026
Merged

ci(release): make publish version step idempotent#4
Tam2 merged 1 commit into
mainfrom
fix/release-version-idempotent

Conversation

@Tam2

@Tam2 Tam2 commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Problem

The 0.1.7 release failed at the Set package version step:

npm error Version not changed
Error: Process completed with exit code 1.

The version bump to 0.1.7 was committed alongside the bare-body fix (5bc4d0b), so package.json on main was already at 0.1.7 when the release ran. The publish job's npm version 0.1.7 --no-git-tag-version treats a no-op set as an error and fails the whole publish.

Fix

Skip the bump when package.json is already at the target version, mirroring the git diff --quiet guard the update-version job already uses. After this merges, re-running the 0.1.7 release will publish cleanly.

Going forward

Keep version bumps out of feature/fix commits — let the release workflow own them.

The publish job ran 'npm version <v> --no-git-tag-version' unconditionally,
which fails with 'Version not changed' when package.json is already at the
target version (e.g. when a version bump was committed alongside a fix).
Skip the bump when the version already matches, mirroring the guard the
update-version job already uses.
@Tam2 Tam2 merged commit 7bf9d39 into main Jul 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant