Skip to content

Tag releases from CI, and document the flow - #111

Merged
leandropineda merged 2 commits into
mainfrom
ci/tag-releases
Jul 30, 2026
Merged

Tag releases from CI, and document the flow#111
leandropineda merged 2 commits into
mainfrom
ci/tag-releases

Conversation

@leandropineda

@leandropineda leandropineda commented Jul 30, 2026

Copy link
Copy Markdown
Member

bump2version tags the commit it creates. That works for the flow CONTRIBUTING described — bump on main, git push --tags — but not for how releases actually happen here. Merge commits are disabled on this repo, so a bump arriving through a PR is squashed or rebased into a different commit, and the tag points at something that never reaches main.

The tag list shows both failure modes:

tag points at reachable from main?
v3.1.0 never created
v3.0.0 ee6fa8d no — dangling on a discarded branch commit
v2.1.0 f526fdd yes (bumped directly on main, the old way)

Neither broke publishing, since the job triggers on contains(head_commit.message, 'Bump version') rather than on tags — but setup.py's download_url for v3.1.0 404s and there is no GitHub release for it.

Workflow: the publish job now creates the tag and release from the version it just published, so it lands on the commit that actually shipped. Runs after PyPI succeeds, and skips when the release already exists so re-running a job is harmless. Needs contents: write, added to that job alone. No tag-triggered workflows exist here, so creating a tag can't set off another publish.

CONTRIBUTING: rewritten to the branch + PR flow with --no-tag, including the bit that bites otherwise — the merge commit message has to keep Bump version for the publish job to fire, and a squash merge takes the PR title. The bump-on-main variant is kept for anyone who prefers it, since the CI step is idempotent.

After this merges, #110's bump tags itself.

bump2version tags the commit it creates, which works when a release is
bumped directly on main -- CONTRIBUTING's flow -- but not when the bump
arrives as a PR: squash and rebase both produce a different commit, so the
tag points at something that never reaches main. v3.0.0 dangles off a
discarded branch commit for that reason, and v3.1.0 was never tagged at
all, leaving setup.py's download_url for it broken.

The publish job now creates the tag and a GitHub release from the version
it just published, after PyPI succeeds, and skips if the release already
exists so a re-run is harmless.
CONTRIBUTING told maintainers to bump on main and push tags, which no
longer matches how releases actually happen (a bump PR) and produced the
dangling v3.0.0 tag and the missing v3.1.0 one. Describes the branch + PR
flow with --no-tag, notes that the merge commit message has to keep 'Bump
version' for the publish job to fire, and keeps the bump-on-main variant
for anyone who prefers it.
@leandropineda leandropineda changed the title Tag releases from CI instead of by hand Tag releases from CI, and document the flow Jul 30, 2026
@leandropineda
leandropineda requested a review from b-Tomas July 30, 2026 00:51
@leandropineda
leandropineda merged commit f1c54d6 into main Jul 30, 2026
24 checks passed
@leandropineda
leandropineda deleted the ci/tag-releases branch July 30, 2026 11:41
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.

2 participants