Skip to content

🐛 Accept prerelease tags in release validator#14

Merged
dariocazzani merged 1 commit into
mainfrom
fix/release-validator-prerelease
May 3, 2026
Merged

🐛 Accept prerelease tags in release validator#14
dariocazzani merged 1 commit into
mainfrom
fix/release-validator-prerelease

Conversation

@dariocazzani
Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the tag validator in the release workflow to accept prerelease tags (rc, a, b) as valid dry-runs of the pyproject.toml version. Previously the validator required exact equality, which broke the documented TestPyPI dry-run flow (e.g. tag `v0.1.0rc1` against `pyproject.toml` version `0.1.0`).

Details

  • The validator now strips `a/b/rc` suffixes from the tag version to compute a "base version," and accepts the tag when either the full tag version or the base version matches `pyproject.toml`.
  • Intent stays the same: `pyproject.toml` remains the single source of truth for the target version; prerelease suffixes are dry-run variants of it.
  • Semantics covered: `0.1.0` -> matches exact, `0.1.0rc1` -> base 0.1.0 matches, `0.2.0` when pyproject=0.1.0 -> rejected.

Discovered by pushing `v0.1.0rc1` immediately after #13 merged and watching the validator fail.

- Tag validation previously required exact match between tag
  version and pyproject.toml version, which broke the documented
  dry-run flow: v0.1.0rc1 against pyproject.toml=0.1.0.
- Now tags are accepted when they either match pyproject.toml
  exactly (final release) or are a prerelease (a/b/rc suffix) of
  the version declared in pyproject.toml.
- Keeps the intent: pyproject.toml is the source of truth for the
  target version; prerelease suffixes are dry-run variants of it.
@dariocazzani dariocazzani merged commit 279f5b8 into main May 3, 2026
6 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