Every release uses ./scripts/release.sh. Do not bump versions, tag, or create GitHub Releases manually.
- Install GitHub CLI (
gh) and authenticate. - Ensure PyPI trusted publishing is configured for this repo (
publish.ymluses thepypiGitHub environment).
-
Add user-facing notes under
## [Unreleased]inCHANGELOG.md. -
Prepare the release PR:
./scripts/release.sh prepare patch # or minor | major | 1.2.3 -
Merge the PR after CI passes (including the changelog check).
-
Publish from a clean default branch checkout:
git checkout main # or master for hotdata-marimo git pull ./scripts/release.sh publish
Pushing a vX.Y.Z tag triggers two workflows:
| Workflow | Purpose |
|---|---|
publish.yml |
Build wheel/sdist and publish to PyPI |
release.yml |
Create the GitHub Release with notes from CHANGELOG.md |
Both workflows also accept a manual re-run against an existing tag, so a failure unrelated to the code — a stale action pin, a PyPI outage — does not require deleting the tag or burning a version number:
gh workflow run "Publish to PyPI" --ref main -f tag=vX.Y.Z
gh workflow run "GitHub Release" --ref main -f tag=vX.Y.Z--ref main selects the workflow definition, so a fix to the workflow file
itself is picked up; everything it runs — including scripts/extract-changelog.py
— still comes from the tag, since that is what is being built and released. The
two refs serve different purposes, which is why they can differ.
A version is only spent once PyPI has accepted an upload. If the publish failed
before that, the same version can still be published — check with
curl -s -o /dev/null -w '%{http_code}' https://pypi.org/pypi/<pkg>/<version>/json
returning 404.
- PR check (
check-release.yml): ifpyproject.tomlversion changes,CHANGELOG.mdmust contain a matching## [X.Y.Z]section. - Tag check (
publish.yml): the tag (withoutv) must match[project].versioninpyproject.toml. - Publish guard (
release.sh publish): refuses to tag if the changelog section is missing.
Together, these make it hard to ship a version without changelog notes or a GitHub Release.