automatically create PyPi releases on tags#106
Open
grische wants to merge 3 commits into
Open
Conversation
grische
force-pushed
the
feature/pypi-release-workflow
branch
from
July 16, 2026 15:05
fee542b to
cc3330a
Compare
Use the hatch-vcs plugin so the package version is derived from the latest git tag (e.g. tag "v0.15.0" -> "0.15.0") instead of a version string maintained in the source tree. The runtime `__version__` is now resolved via importlib.metadata, using the importlib_metadata backport on Python 3.7 to match the pattern already used in configurator.py, and the obsolete morgan/__about__.py is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a release workflow that builds and publishes to PyPI on any `v*` tag push, using OIDC trusted publishing (no stored secrets). The build job checks out full history (fetch-depth: 0) so the tag is visible to hatch-vcs, and a separate publish job runs in a `pypi` environment with `id-token: write`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Publish to TestPyPI on every push to main (and on tags), and publish to PyPI only for tags. The PyPI job depends on the TestPyPI job, so a tagged release is only pushed to PyPI once the TestPyPI upload succeeds. Set setuptools-scm's local_scheme to "no-local-version" so dev builds from untagged commits produce upload-valid versions (e.g. "0.15.1.dev1"); (Test)PyPI rejects PEP 440 local version identifiers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
grische
force-pushed
the
feature/pypi-release-workflow
branch
from
July 17, 2026 09:49
cc3330a to
b36afe4
Compare
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.
This replaces the manual releases with automatic releases on tag pushes (and test releases on every merge to
main).