Repository navigation
ci: publish to PyPI on release and add manual Prepare Release workflow - #46
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzhhavuuhR5JQy6eH8h
Prepare Release now turns the '## Unreleased' CHANGELOG section into the new version's entry and commits it with the version bump. An optional RELEASE_TOKEN secret is used to push the release commit and tag when the default branch is protected; the tag push then triggers release.yml itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzhhavuuhR5JQy6eH8h
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzhhavuuhR5JQy6eH8h
main is protected, so Prepare Release now requires the RELEASE_TOKEN secret and fails early without it. Dropping the GITHUB_TOKEN fallback also removes the need for release.yml to be callable via workflow_call: the tag pushed with RELEASE_TOKEN triggers it directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KBLBzhhavuuhR5JQy6eH8h
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.
Summary
Releases now publish to PyPI, and a whole release can be cut from the GitHub UI.
New:
Prepare Releaseworkflow (.github/workflows/prepare-release.yml)You start it by hand (Actions → Prepare Release → Run workflow). It only runs on the default branch.
patch/minor/majorbump, or an exactversion, plus an optionalrequire_changelogcheck.RELEASE_TOKENsecret isn't set.make change-version.CHANGELOG.md: renames## Unreleasedto## vX.Y.Z - <date>, puts- N/Aunder any empty Features/Fixes heading, and starts a fresh empty## Unreleasedabove it. If the version already has an entry, the file is left alone. If there's nothing to release, the workflow warns, or fails whenrequire_changelogis set.build: release vX.Y.Z(version files plusCHANGELOG.md), creates the annotatedvX.Y.Ztag, and pushes the commit and tag together in one atomic push.RELEASE_TOKEN, a token from an account allowed to bypass the branch protection onmain. The workflow's ownGITHUB_TOKENis read-only.GITHUB_TOKEN, the push triggersrelease.yml, which shows up as its own run.Updated:
Releaseworkflow (.github/workflows/release.yml)v*tag pushes, from Prepare Release or frommake release.pyproject.toml.PYPI_DEPLOY_TOKENsecret. Only the wheel and source package are uploaded, becausedist/also holds the Storm package JSON files.--skip-existinglets a release be re-run safely.CHANGELOG.mdentry, with GitHub's auto-generated notes added below.Other
scripts/changelog.py: has two commands.notes <version>prints a version's entry.release <version> [date]renames the Unreleased section to that version.make releasenow runs the same changelog step and commitsCHANGELOG.md.CHANGELOG.md: adds a## Unreleasedsection that describes this PR.doc/contributing.md:PYPI_DEPLOY_TOKEN,DOCS_DISPATCH_TOKEN,RELEASE_TOKEN);## Unreleasedheader;Setup
PYPI_DEPLOY_TOKENandRELEASE_TOKENhave both been added.RELEASE_TOKENmust be allowed to bypass the branch protection rule onmain.Testing
scripts/changelog.pywas tested locally against a copy ofCHANGELOG.md: rolling Unreleased, filling empty headings with N/A, skipping when the entry already exists, failing on a missing entry, and extracting notes.🤖 Generated with Claude Code
https://claude.ai/code/session_01KBLBzhhavuuhR5JQy6eH8h