Releases are cut from main by pushing a vX.Y.Z tag; the release workflow does the rest.
-
Bump the version in
src/nicefigs/__init__.py(__version__ = "X.Y.Z", following semantic versioning).pyproject.tomlreads it from there. -
Update
CHANGELOG.md: rename## [Unreleased]to## [X.Y.Z] - YYYY-MM-DDand open a fresh## [Unreleased]above it. The release notes are taken verbatim from this section. -
Merge both changes to
mainthrough a pull request, with CI green. -
Tag and push the merge commit:
git switch main && git pull git tag -a vX.Y.Z -m "vX.Y.Z" git push origin vX.Y.Z
The workflow checks the tag matches __version__, builds the sdist and wheel, checks them with
twine, runs the test suite against the installed wheel, publishes to PyPI via trusted publishing,
and creates the GitHub release with the changelog section and the distributions attached.
- On PyPI, add a trusted publisher for project
nicefigs: ownerEarthyScience, repositorynicefigs, workflowrelease.yml, environmentpypi. - On GitHub, create the
pypienvironment (Settings → Environments); restrict it tov*tags. - For the docs site, set Pages to deploy from the
gh-pagesbranch.