Skip to content

fix: support bare semver tags and fix check_release workflow#111

Merged
jimisola merged 1 commit intomainfrom
fix/release-versioning
Mar 8, 2026
Merged

fix: support bare semver tags and fix check_release workflow#111
jimisola merged 1 commit intomainfrom
fix/release-versioning

Conversation

@jimisola
Copy link
Member

@jimisola jimisola commented Mar 8, 2026

Problem

The CI/CD run produced 0.0.5.devXXXX instead of 0.1.0 when releasing with a bare semver tag (0.1.0 without v prefix).

Root Causes

  1. poetry-dynamic-versioning default pattern requires v-prefixed tags — tag 0.1.0 wasn't recognized, fell back to v0.0.5 + commit distance.
  2. check_release.yml was a no-op: the if: github.event_name == 'push' condition is always false when called via workflow_call from a release event.

Changes

pyproject.toml

Added pattern to [tool.poetry-dynamic-versioning] to match bare semver tags (no v prefix required):

pattern = "^(?P<base>\\d+\\.\\d+\\.\\d+.*)$"

.github/workflows/check_release.yml

  • Fixed workflow name
  • Removed the broken no-op condition
  • Added tag format validation (bare semver, e.g. 1.2.3)
  • Added branch validation (allows main, hotfix/*, release/*)

- Add pattern to poetry-dynamic-versioning to match tags without v prefix
- Fix check_release.yml: was a no-op (push event never fires on release)
- Validate bare semver tag format (e.g. 1.2.3, not v1.2.3)
- Validate release targets main, hotfix/*, or release/* branch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jimisola jimisola self-assigned this Mar 8, 2026
@jimisola jimisola merged commit 1563b8d into main Mar 8, 2026
6 checks passed
@jimisola jimisola deleted the fix/release-versioning branch March 8, 2026 20:46
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