feat: add PyPI publishing via trusted publisher and dynamic versioning - #344
Merged
Merged
Conversation
Switch to hatch-vcs for git-tag-based versioning, add PyPI publish job to release workflow using OIDC trusted publishing, and add project metadata (license, classifiers, URLs). All CI checkout steps use fetch-depth:0 so hatch-vcs can resolve the version from tags. Harden the release pipeline: verify wheel version matches the git tag before publishing, make GitHub release creation idempotent, add a release-status summary job, and expose __version__ in the planner package. Add a wheel E2E test asserting hatch-vcs resolves a real version. Assisted-by: Claude <noreply@anthropic.com> Signed-off-by: Andre Fredette <afredette@redhat.com>
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.
Description
Add PyPI publishing to the release pipeline using OIDC trusted publishing, and switch to hatch-vcs for git-tag-based versioning.
Changes:
version = "0.1.0"todynamic = ["version"]with hatch-vcs, so the wheel version is derived from git tagspublishjob torelease.ymlusingpypa/gh-action-pypi-publishwith OIDC trusted publisherbuildjob that builds the wheel and verifies the version matches the git tag before publishingrelease-statussummary job that fails if either release or publish failedfetch-depth: 0to all CI checkout steps so hatch-vcs can resolve the version__version__in theplannerpackage via the hatch-vcs generated_version.pypyproject.toml(license, classifiers, URLs)Prerequisites (already done):
How Has This Been Tested?
fetch-depth: 0changes (hatch-vcs resolves version in all jobs)uv buildproduces a wheel with the correct version locallyMerge criteria: