Repository navigation
ci: automate PyPI publishing from stable GitHub releases - #146
Merged
Merged
Conversation
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.
Summary
A published stable GitHub Release now triggers PyPI publication using its existing wheel and sdist. A manual
main-branch dispatch can retry or backfill a tag. Preparation verifies release attachments, SHA256SUMS, package name/version and existing PyPI files; identical files are skipped, partial uploads resume, and conflicting or yanked files fail visibly. Upload runs in a separate Ubuntu job using the encryptedPYPI_API_TOKENsecret. A final job verifies registry hashes and installs the exact wheel from official PyPI in a clean environment, including dependency and CLI checks.Adds English/Chinese maintainer guides covering draft-first asset attachment, retries, the GitHub-token event limitation and optional future Trusted Publishing migration. Release package versions remain 1.1.1 because this change only adds release infrastructure.
Validation
Production workflow validation: run 40458950651 passed all three jobs on main using v1.1.1. The encrypted secret was available, existing files were safely skipped, registry hashes matched, and a clean Ubuntu/Python 3.12 install from official PyPI passed provenance, dependency and CLI checks. This validates the no-op/retry path; it does not exercise a new authenticated upload. Main and dev were synchronized by a non-forced fast-forward after checking that the only file differences were these release-automation changes.