To be able to do a release, you will need an environment with the twine and build packages installed:
`
python -m pip install build twine
`
In that environment, and having the credentials for the PyPI user (both the normal PyPI and the testing one), you can then do a test release by following these steps:
- Clean the dist directory, if present: rm dist/*
- Edit the version in version.py, and commit it.
- Create a git tag with the version number.
- Build the package with python -m build
- Upload the package to the test PyPI instance with twine upload dist/* --repository-url https://test.pypi.org/legacy/
You should then test if everything went right, by installing that package in a new virtual environment using pip (pointing to that test index).
If everything went right, you can then do the actual release to the real PyPI index:
`
twine upload dist/*
`