8000 Publish a release when a merge sets a new version by almogtavor · Pull Request #35 · afdEP/afdEP-comm · GitHub
[go: up one dir, main page]

Skip to content

Publish a release when a merge sets a new version - #35

Merged
Etelis merged 1 commit into
mainfrom
release-workflow
Nov 16, 2026
Merged

Etelis merged 1 commit into
mainfrom
release-workflow

Conversation

@almogtavor
@almogtavor almogtavor commented Nov 16, 2026 •
Copy link
Copy Markdown
Member

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. If v<version> has no release yet, it builds the wheel and sdist, runs tests/check_distribution.py, checks that afdep.__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

  • The workflow file parses; the build and distribution check are the same commands CI already runs
  • The first real run happens on merge

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.
@almogtavor
almogtavor requested a review from Etelis as a code owner November 16, 2026 12:26
@Etelis
Etelis merged commit ef2ac06 into main Nov 16, 2026
4 checks passed
@Etelis
Etelis deleted the release-workflow branch November 16, 2026 12:27
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

0