Repository navigation
Conversation
Publish to PyPI now triggers on push to main (and workflow_dispatch). A check job reads project.version from pyproject.toml and only proceeds when no v<version> tag exists and the version is not already on PyPI. The release path then runs tests, builds and validates the dists, publishes behind the pypi environment approval, and finally creates the v<version> tag and a GitHub Release with notes extracted from PYPI-RELEASE-NOTES.md and the dist files attached. This removes the hand-maintained tag/version coupling that caused the v2.2.0 (version mismatch) and v2.0.x publish failures. test.yaml gains a weekly cron so dependency/stub drift (the cause of the v2.2.1 failure) shows up between pushes instead of on release day.
This branch has not been deployed
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.
Why
PyPI is stuck at 2.1.0 while
mainsays 2.2.1. The publish history is 3 successes out of 10 attempts, and every failure was either a tag that didn't matchpyproject.toml(v2.2.0, v2.0.1–v2.0.4) or dependency drift nobody saw until tag day (v2.2.1, failed ontypes-networkxstub changes).What changes
publish-pypi.yml: release on version bump, not on tag push.main(plusworkflow_dispatch, main only).checkjob readsproject.versionfrompyproject.toml. Ifv<version>already exists as a tag it does nothing. If the version is already on PyPI but untagged it fails loudly with the tag command to run.pypienvironment approval) → create thev<version>tag and a GitHub Release, with notes extracted from the matching# PHART <version>section ofPYPI-RELEASE-NOTES.mdand the dist files attached.pyproject.toml, push to main, approve the deployment. The tag can no longer disagree with the version because the workflow derives it.test.yaml: weekly cron. Dependency and stub updates now surface as a scheduled red X instead of a failed release.Manual steps that go with this PR (repo settings, not files)
These were applied/attempted alongside the PR. If any didn't land, run them:
pypienvironment currently only allows deployments fromv*tags. The new workflow deploys frommain:2.0.0-protectruleset tomainwith only deletion + force-push protection (it currently restricts creation/update on every branch, which is why PRs show as BLOCKED):.github/workflows/mypy.yaml. It duplicates the mypy step already intest.yamland only adds a second red X.After merge
mainis at 2.2.1 with nov2.2.1tag pointing at a published build. If you first delete the stalev2.2.1tag (git push --delete origin v2.2.1), the merge of this PR will itself release 2.2.1 after you approve the deployment. Otherwise bump to 2.2.2.🤖 Generated with Claude Code