ci: skip the release instead of failing it when the version is unchanged - #259
Open
Olen wants to merge 1 commit into
Open
ci: skip the release instead of failing it when the version is unchanged#259Olen wants to merge 1 commit into
Olen wants to merge 1 commit into
Conversation
The workflow triggers on any pyproject.toml push to main, but only a version bump is a release. The tag check handled that with `exit 1`, so every dependency or config edit produced a red run — six today alone, and the same pattern back in May. A benign "nothing to release" was indistinguishable from a broken release, which trains everyone to ignore red runs on this workflow. Record the result as a step output and gate the tag, GitHub release, build and publish steps on it. Unchanged version now ends green with the release steps skipped. The condition is `== 'false'` rather than `!= 'true'` so that a check step that errors without setting an output skips publishing rather than proceeding. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
release.ymlnow ends green and skips the release steps when the version is unchanged, instead of exiting 1.Why
The workflow triggers on any push to
maintouchingpyproject.toml, but only a version bump is actually a release. The tag check handled the non-release case withexit 1, so every dependency or config edit produced a red run:Six such runs today, and the same pattern back in May. The guard was working correctly — nothing was ever published, and PyPI still shows 1.2.1 from 2026-05-14 — but a benign "nothing to release" was indistinguishable from a genuinely broken release. That trains everyone to ignore red runs on the one workflow where red should mean something.
Change
The check records
exists=true|falseas a step output, and the tag / GitHub release / build / publish steps are gated on it.The condition is
== 'false'rather than!= 'true'deliberately: if the check step ever errors without setting an output, the publish steps skip rather than proceed. Failing closed is the right default for a publish.Behaviour
pyproject.tomledited, version unchangedTesting
Workflow YAML validated and step guards confirmed:
Note this PR does not touch
pyproject.toml, so merging it will not itself trigger the release workflow — the first real exercise will be the nextpyproject.tomlchange to land onmain.🤖 Generated with Claude Code