Repository navigation
Conversation
Publishing a release needed two approvals, one on the release environment for the binaries and one on the pypi environment for PyPI. release.yml runs both from the release: published event. upload_to_release and publish_pypi share the release environment, so one reviewer approval covers both, and PyPI is only published when the executables built. The Test PyPI upload is the manual target=test-pypi and has no environment, so it needs no approval. workflow_dispatch also takes target=all, binaries or pypi to repair or publish by hand. The smoke tests workflow now follows Publish release, and release-on-merge and contributing.md describe the new flow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Publishing a release needed three approvals: a Test PyPI run on the
pypienvironment, the PyPI upload on thepypienvironment, and attaching the binaries on thereleaseenvironment. This mergespackage.ymlandpublish-pypi.ymlintorelease.yml, so publishing needs one approval and Test PyPI needs none.How it works
release: published,buildexebuilds the executables andbuild_distbuilds the wheel and sdist. Neither is gated.upload_to_releaseandpublish_pypiboth use thereleaseenvironment. One reviewer approval covers both.publish_pypineedsbuildexe, so PyPI is only published when the executables built.target=test-pypijob. It has no environment and no approval.workflow_dispatchtakestarget:all,binaries(re-attach executables),pypi(publish without a release) ortest-pypi. It replaces theis_draftinput.When it takes effect
mainonly, sorelease.ymlworks from the next merge ofdevelopmentintomain. Until then the oldpublish-pypi.ymlonmainstill gates Test PyPI.Things to know
target=test-pypiand upload a branch build to Test PyPI without approval.PYPI_API_TOKENis a repository secret, so a workflow on any branch can read it. The environment approval gates this workflow but does not protect the token. Moving the token to thereleaseenvironment would fix that. It is a settings change and not part of this PR.gh workflow run package.ymlno longer exists;contributing.mdhas the new commands. The concurrency group is renamed topublish-…, and the smoke tests inpython-app.ymlnow follow "Publish release".Needs checking on the first run
main, dispatchtarget=test-pypito check the Test PyPI job.After merging, a repo admin should
pypienvironment;PYPI_API_TOKENinto thereleaseenvironment.prevent_self_reviewstays onrelease, so whoever publishes still can't approve.🤖 Generated with Claude Code