Repository navigation
Release on merging the Prepare PR and move pins once PyPI serves it - #98
Merged
Merged
Conversation
Merging a "Prepare vX.Y.Z" pull request now tags vX.Y.Z and starts Publish. Once PyPI serves the release, Publish moves the README's fxcss== pins to it, refreshes fxcss.com and creates the GitHub release. Website docs no longer listens for Publish, so each release refreshes the site once. A new Release version check fails any other pull request that changes __version__, and Release refuses to tag a version that didn't come from a release pull request. The README pins move to 0.25.0, which the 0.25.0 release left at 0.24.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Releasing used to need two manual steps after the "Prepare vX.Y.Z" pull request merged: pushing the tag, then a follow-up PR to move the README's install pins. Either one could be skipped without anything noticing. After 0.25.0 the pins stayed at 0.24.0. 0.26.0 is on main but was never tagged, so fxcss.com correctly still shows 0.25.0.
What changes
fxcss/__init__.pychanges on main. If the commit came from a pull request titled "Prepare vX.Y.Z" for an untagged version newer than the latest release, it tags the commit and starts Publish on the tag. Running it by hand (gh workflow run release.yml --ref main) releases the version already on main.fxcss==pins to the new version, starts the website refresh and creates the GitHub release with generated notes if none exists. Each step still runs if an earlier one fails, and the job then fails.__version__unless its title says "Prepare vX.Y.Z" for the new version, the version increases and it isn't already tagged. It reruns when a pull request is retitled.The rules live in
scripts/release.pyso the workflows and tests share them.Behaviour notes
__version__.Testing
python3 -m unittest tests.test_release_orchestration -v python3 -m unittest discover -s tests actionlint .github/workflows/*.ymlThe new tests run the extracted workflow scripts against local Git repositories, including a pin push that has to rebase because main moved, plus stubbed
ghcalls. The full suite passes locally (699 tests, 1 skipped) and actionlint is clean.🤖 Generated with Claude Code