Repository navigation
Publish tested Python artifacts through PyPI trusted publishing - #34
Merged
Merged
Conversation
stephenvapiai
approved these changes
Nov 3, 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.
Python currently rebuilds during publication with registry credentials available, so it does not publish the exact wheel exercised by CI. Build the wheel and source distribution once without publishing authority, validate their metadata, and install that same wheel in all seven existing Python/Pydantic test combinations. The wheel is built from the source distribution by
python -m build.Publication now downloads those artifacts in a separate job with no checkout, package build, dependency installation, or stored PyPI credentials. It uses PyPI trusted publishing bound to this repository,
ci.yml, and the tag-onlypypienvironment. That registry and environment configuration has been saved; no additional release approval is required.For tag pushes, reject a mismatched package version, an event/checkout mismatch, or a commit not already on protected
mainbefore installing build tools. Keep the custom scripts in.fernignoreso regeneration preserves them. Tests cover approved main ancestors, annotated tags, unmerged commits, incorrect checkouts, missing refs, and invalid release versions/refs.Validation: six local Python release-validation tests pass. GitHub CI passed the distribution build/metadata validation, mypy, and all seven test combinations on both push and pull-request runs. No release tag was created and no package was published.
Repository rules were separately updated to require
compile,package, and all seven matrix checks, dismiss stale approvals after code changes, and retain an empty bypass list. This PR does not add automatic post-merge tagging, API compatibility comparison, registry version uniqueness checks, or post-publication installation verification.