Make the release pipeline rehearsable without publishing - #3
Merged
Conversation
workflow_dispatch was listed as a trigger and could never work. GITHUB_REF_NAME is the branch on a manual run, so the tag-matches-version step compared a branch name to a version and failed on the first step every time. There was no way to exercise the release short of tagging, and a tag cannot be taken back. A manual run now takes a target. `rehearse`, the default, does everything a tag does except publish: builds the sdist and wheel, asserts the wheel still carries the firmware templates, runs twine check, installs the wheel into a clean environment and generates firmware from it. `testpypi` additionally uploads to test.pypi.org, for exercising the upload itself. `pypi` is there for a manual re-run of a release that half failed, and has to be asked for by name, so the default manual run cannot reach PyPI by accident. twine check is the useful addition even for tagged releases: it is what PyPI validates on upload, and nothing else in the pipeline looks at the metadata or at whether the README renders. Without it the first sign of a bad long_description is the upload rejecting it, at which point the tag exists. Verified locally: twine check --strict passes on both artifacts built from this commit, the install-and-run step runs end to end from the built wheel, and the workflow parses with the job conditions resolving as intended.
Boernsman
force-pushed
the
release-rehearsal
branch
from
August 28, 2026 20:48
a2d4c35 to
0f22bbf
Compare
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.
workflow_dispatchwas listed as a trigger onrelease.ymland could neverwork:
GITHUB_REF_NAMEis the branch on a manual run, so thetag-matches-version step compared a branch name to a version and failed on the
first step, every time. There was no way to exercise the release pipeline short
of pushing a tag, and a tag cannot be taken back.
What a manual run does now
rehearse(default)testpypipypipypihas to be chosen by name, so the default manual run cannot reach PyPI byaccident. Tag pushes are unchanged: they publish to PyPI and then create the
GitHub release.
twine check
The useful addition even for real releases. It is what PyPI validates on
upload, and nothing else in the pipeline looks at the metadata or at whether
the README renders. Without it, the first sign of a bad
long_descriptionisthe upload rejecting it — after the tag exists.
The rehearsal also installs the built wheel into a clean environment and runs
it, so a green rehearsal means the artifact works, not just that it built.
Verified locally
twine check --strictpasses on both artifacts built from this commit--version,check --strict,generate, and the generated firmware's own 68 host checksStill needed before a real release
The PyPI trusted publisher, which is what this makes it possible to defer:
pypi.org/manage/project/pinside/settings/publishingwith ownerbitcrushtesting, repositorypinside, workflowrelease.yml, environmentpypi.testpypineeds the same at test.pypi.org if you want to exercise theupload path first.