Skip to content

ci: publish to PyPI on release and add manual Prepare Release workflow - #14

Merged
gormaniac merged 1 commit into
mainfrom
claude/hopeful-fermi-40byn9
Nov 1, 2026
Merged

gormaniac merged 1 commit into
mainfrom
claude/hopeful-fermi-40byn9

Conversation

@gormaniac

Copy link
Copy Markdown
Owner

Mirrors the PyPI release setup from stormlibpp so pyhatching can be released entirely from CI.

Changes

  • release.yml (on v* tag push): verifies the tag matches the pyproject.toml version, uploads the package to PyPI with PYPI_DEPLOY_TOKEN, and uses the version's CHANGELOG.md entry as the GitHub Release notes (plus auto-generated notes). Same as stormlibpp's, minus the Storm package steps.
  • prepare-release.yml (new, manual workflow_dispatch): runs the tests, bumps the version (patch/minor/major or explicit), rolls ## Unreleased in CHANGELOG.md into the new version's entry, commits, and pushes a v#.#.# tag using RELEASE_TOKEN, which triggers release.yml.
  • scripts/changelog.py: copied from stormlibpp.
  • CHANGELOG.md (new): seeded with an ## Unreleased section covering the changes since v0.3.1. Please review these entries before the first release.
  • Makefile: adds make tests; make release now also rolls the changelog.
  • README.md: new "Releasing" section.

Before the first CI release

Add these repository secrets:

  • PYPI_DEPLOY_TOKEN: PyPI API token with upload rights for pyhatching.
  • RELEASE_TOKEN: token with Contents read/write from an account that can bypass main's branch protection. Prepare Release fails immediately without it.
  • DOCS_DISPATCH_TOKEN: already used by the existing workflow.

Testing

Workflow YAML parses, and scripts/changelog.py release/notes were exercised on a scratch copy of CHANGELOG.md. The workflows themselves haven't run yet.


Generated by Claude Code

Mirrors the stormlibpp release setup:
- release.yml verifies the tag matches the package version, uploads the
  package to PyPI with PYPI_DEPLOY_TOKEN, and uses the CHANGELOG entry as
  the GitHub Release notes.
- prepare-release.yml (workflow_dispatch) runs the tests, bumps the
  version, rolls the CHANGELOG "## Unreleased" section, commits, and pushes
  a v#.#.# tag with RELEASE_TOKEN, which triggers release.yml.
- Adds scripts/changelog.py, CHANGELOG.md, and a `make tests` target, and
  `make release` now rolls the CHANGELOG too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KBLBzjg3yC85kzUV1oRyyD
@gormaniac
gormaniac merged commit 7435849 into main Nov 1, 2026
1 check passed
@gormaniac
gormaniac deleted the claude/hopeful-fermi-40byn9 branch November 1, 2026 21:42
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