- Bump
versioninpyproject.toml. - Update
versionanddate-releasedinCITATION.cff. - Update the "Upcoming version (not yet released)" heading in
docs/source/changelog.rstto the new version number and date. - Commit the version bump, then create an annotated tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.ZClean previous build artifacts, then build:
rm -rf dist/
make buildThis runs uv build to produce a wheel and sdist in dist/, then smoke-tests
both artifacts in isolated environments.
Upload to TestPyPI first to catch packaging issues before the real release:
UV_PUBLISH_TOKEN=<your-testpypi-token> make publish-testThen verify the upload works end-to-end. Use --index-strategy unsafe-best-match
because TestPyPI won't have all dependencies and uv needs to fall back to real
PyPI for them:
uvx --extra-index-url https://test.pypi.org/simple/ \
--index-strategy unsafe-best-match \
--from mjlab \
demoNote: TestPyPI requires a separate account and token from real PyPI. Generate one at https://test.pypi.org/manage/account/token/.
UV_PUBLISH_TOKEN=<your-pypi-token> make publishGenerate a token at https://pypi.org/manage/account/token/.
Verify the release installs and runs correctly. Use --refresh to bypass
the uvx cache (which may still hold the TestPyPI version):
uvx --refresh --from mjlab demoIf the tag has already been created and HEAD has moved ahead, check out the tag before building:
git checkout vX.Y.Z
make build
make publish
git checkout main