Skip to content

Release on merging the Prepare PR and move pins once PyPI serves it - #98

Merged
AdamXweb merged 1 commit into
mainfrom
release/tag-on-merge
Nov 9, 2026
Merged

AdamXweb merged 1 commit into
mainfrom
release/tag-on-merge

Conversation

@adamXbot

@adamXbot adamXbot commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

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

  • Release (new workflow) runs when fxcss/__init__.py changes 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.
  • Publish gets a follow-up job that runs only after the existing installability gate. It moves the README's 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.
  • Release version (new check) fails a pull request that changes __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.
  • Website docs now only reacts to README pushes. Publish starts the refresh after a release, so the site refreshes once per release.
  • The README pins move to 0.25.0, and the README gains a "Releasing fxcss" section.

The rules live in scripts/release.py so the workflows and tests share them.

Behaviour notes

  • Merging this does not release anything, because it doesn't change __version__.
  • main is already at 0.26.0, so the website refresh this README change starts will still wait for PyPI. Running Release by hand ships 0.26.0. The follow-up then moves the pins to 0.26.0 and refreshes the site.
  • A tag or release created by hand still works. The follow-up skips a release that already exists.

Testing

python3 -m unittest tests.test_release_orchestration -v
python3 -m unittest discover -s tests
actionlint .github/workflows/*.yml

The new tests run the extracted workflow scripts against local Git repositories, including a pin push that has to rebase because main moved, plus stubbed gh calls. The full suite passes locally (699 tests, 1 skipped) and actionlint is clean.

🤖 Generated with Claude Code

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>
@AdamXweb
AdamXweb merged commit 8ce9a22 into main Nov 9, 2026
20 checks passed
@AdamXweb
AdamXweb deleted the release/tag-on-merge branch November 9, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants