Creating a new environment can help avoid pushing local changes and any extra tag.
conda create -n nbresuse-release -c conda-forge twine keyring
conda activate nbresuse-release
Alternatively, the local repository can be cleaned with:
git clean -fdx
Make sure the dist/
folder is empty.
- Update the version in
setup.py
python setup.py sdist bdist_wheel
- Double check the size of the bundles in the
dist/
folder - Run the tests
pip install "dist/nbresuse-X.Y.Z-py3-none-any.whl[dev]"
python -m pytest
export TWINE_USERNAME=mypypi_username
twine upload dist/*
The easiest is to wait for the bot to open the PR automatically.
To do the release manually:
- Open a new PR on https://github.com/conda-forge/nbresuse-feedstock to update the
version
and thesha256
hash - Wait for the tests
- Merge the PR
The new version will be available on conda-forge
soon after.
Commit the changes, create a new release tag, and update the stable
branch (for Binder), where x.y.z
denotes the new version:
git checkout master
git add setup.py
git commit -m "Release x.y.z"
git tag x.y.z
git checkout stable
git reset --hard master
git push origin master stable x.y.z