Repository navigation
Publish a release when a merge sets a new version - #35
Merged
Merged
Conversation
A push to main that changes pyproject.toml builds the wheel and sdist, checks them, tags v<version> and creates the release with both files attached. A version that already has a release is skipped.
Etelis
approved these changes
Nov 16, 2026
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.
What and why
PR #34 set the version to 1.2.0, but nothing tagged or published it: releases were created by hand, and v1.1.0 is still the latest one.
I added a workflow that runs when a merge to main changes
pyproject.toml. Ifv<version>has no release yet, it builds the wheel and sdist, runstests/check_distribution.py, checks thatafdep.__version__matches, tags the commit and creates the GitHub release with both files attached. A version that is already released is skipped, so ordinary merges do nothing.Merging this PR will publish v1.2.0 from main, since it is still missing. The notes are generated from the merged PRs and can be edited afterwards.
Users install the package from a git tag (
afdep-comm @ git+https://github.com/afdEP/afdEP-comm.git@v1.1.0), so the tag is what releases it. After this, a version bump PR is enough for them to move to@v1.2.0. The package is not on PyPI and this PR does not publish there.Checks