Releasing¶
lairen publishes to PyPI through GitHub Actions trusted publishing and publishes
this site to GitHub Pages on every push to main.
Version locations¶
Update the version in both places before tagging:
pyproject.toml:[project] versionsrc/lairen/__init__.py:__version__
Also update any version mention in README.md (the status line) and check that
the examples in docs/ still describe the released behavior.
Pre-release checks¶
docs-build runs with --strict; warnings fail the build. The site is copied
to site/, which is not committed.
Publish a release¶
- Commit the version bump and merge it to
main. - Create and push an annotated tag:
- Create the GitHub release. Publishing the release triggers the PyPI workflow:
- Watch the workflow:
How publishing is wired¶
.github/workflows/workflow.ymlruns onrelease: publishedand on manual dispatch. It builds the distributions with Pixi and uploads them withpypa/gh-action-pypi-publish.- The PyPI project uses a pending trusted publisher for
igamenovoer/lairen, workflow fileworkflow.yml, no environment restriction. The workflow filename must stayworkflow.yml. - No PyPI token is stored in the repository. The job authenticates with
id-token: write.
Verify the release¶
Check the PyPI project page and the generated metadata:
curl -s https://pypi.org/pypi/lairen/json | python -c \
"import json,sys; d=json.load(sys.stdin); print(d['info']['version'])"
PyPI embeds the README from the uploaded artifacts. A README-only change is visible on the project page only after the next release.
Documentation deployment¶
.github/workflows/docs.yml builds mkdocs.yml with pixi run docs-build and
deploys site/ through GitHub Pages. It runs on pushes to main that touch
docs inputs and can be started manually.
Pages is configured with Source: GitHub Actions for this repository. The site URL is:
Verify a deployment with:
The deploy job uses the github-pages environment. Deployment history is
available under the repository's Actions and Deployments tabs.