ci: trigger release + PyPI publish on tag push#233
Merged
Conversation
Replace the `on: release: published` trigger with a tag-driven Release workflow (renamed publish.yml -> release.yml). Pushing a semver tag now both publishes to PyPI and creates the matching GitHub Release in one job, collapsing the manual release-creation step into the tag. - Tag patterns cover stable (2.19.2) and PEP 440 pre-releases (2.0.0rc1); the old release-published trigger is removed to avoid a double-publish loop, since the workflow now creates a published Release itself. - PyPI runs first (irreversible); the GitHub Release is created only if that step succeeds. - Release description comes from planning/releases/<tag>.md when present (verbatim, no auto-changelog appended), else GitHub's generated notes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a "Cutting a release (maintainers)" note to the CLAUDE.md Workflow section: write planning/releases/<version>.md, push a bare semver tag off green main, and release.yml publishes to PyPI (version from the tag) + creates the GitHub Release. Kept out of the contributor-facing docs/dev/contributing.md since cutting a release is a maintainer-only job. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
d28e219 to
d7124c3
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.
What
Makes modern-di's release flow tag-driven. Pushing a semver tag now both publishes to PyPI and creates the matching GitHub Release in one job. Renames
publish.yml→release.ymlto reflect the expanded role.Before: you manually publish a GitHub Release, which fires
publish.yml→just publish.After:
git push origin 2.19.2→ publish to PyPI + create the Release. No manual release-creation step.Key points
on: release: publishedtrigger removed. Mandatory, not cosmetic: the workflow now creates a published Release itself, which would re-fire that trigger and double-publish. The tag is the sole entry point.main.just publishfails the job stops and no GitHub Release is created advertising a version that never reached PyPI.just publishalready derives the version from$GITHUB_REF_NAME, which is the tag under apush: tagsevent, so it works unchanged.2.0.0rc1,2.0.0a5) — flagged as GitHub pre-releases so they aren't marked "Latest". The historical2.0.0-alpha.5form is intentionally not matched (not PEP 440;uv versionwould reject it).planning/releases/<tag>.mdwhen present (verbatim, no auto-changelog appended), else GitHub's generated notes.Docs
Documents the now-canonical tag-driven process in the CLAUDE.md Workflow section ("Cutting a release (maintainers)"). Kept out of
docs/dev/contributing.mdsince cutting a release is a maintainer-only job, not a contributor step.Validation
2.19.2) and pre-release (2.0.0rc1) are disjoint — no double-trigger.2.19.2→false;2.0.0rc1/2.0.0a5/2.0.0b1→true.🤖 Generated with Claude Code