git checkout master
git clean -xfd
to clean out any old builds
git fetch upstream
git merge --ff-only upstream/master
python setup.py sdist
python setup.py bdist_wheel
twine upload dist/*
See https://packaging.python.org/tutorials/distributing-packages/#packaging-your-project for more information.