the release happens from main so make sure it is up-to-date:
git pull origin main
look at changelog.rst and make sure it is complete and with references to issues and pull requests
run the test suite, try to call the program and make sure the pre-commit hook works
check that the documentation is building
Update the release date and commit the release:
git commit -am "Release v0.X.Y"
Tag the release:
git tag -a v0.X.Y -m "v0.X.Y"
Build source and binary wheels:
git clean -xdf python -m pep517.build --source --binary .
Use twine to check the package build:
twine check dist/*
try installing the wheel in a new environment and run the tests / binary again:
python -m venv test source test/bin/activate python -m pip install -r dev-requirements.txt python -m pip install pytest python -m pip install dist/*.whl python -m pytest python -m blackdoc --check .; echo $? python -m blackdoc .; echo $? git reset --hard HEAD deactivate git clean -xdf
Push to main:
git push origin main git push origin --tags
Update stable:
git checkout stable git merge v0.X.Y git push origin stable
Make sure readthedocs builds both stable and the new tag
Draft a release on Github. Be careful, this can't be undone.
A workflow will then publish to PyPI, which in turn will be picked up by conda-forge and a PR will be opened automatically on the feedstock.
Add a new section to the changelog and push directly to main