Skip to content

Instantly share code, notes, and snippets.

@CCampJr
Last active November 29, 2021 16:35
Show Gist options
  • Save CCampJr/dca856a4322c9640f857956ba08161e6 to your computer and use it in GitHub Desktop.
Save CCampJr/dca856a4322c9640f857956ba08161e6 to your computer and use it in GitHub Desktop.
Release steps and checklist

VERSION = 0.1.0 (Version of repo to be published)

DATE = 190522

New python build and twine steps

  1. pip install build
  2. pip install twine
  3. python -m build
  4. twine upload ./dist/*

Abbreviated Release (Non-Forked Release)

  1. git checkout dev branch
  2. git pull --all
  3. Change version number in init.py VERSIONrc0
  4. Change version in docs/conf.py if need be
  5. Change shields and badges in README and index.rst (docs) to point to master branch
  6. Clean out dist folder
  7. Clean out docs (e.g. make clean) if applicable
  8. git merge master
  9. Commit changes (if needed)
  10. Wait for CI build to complete
  11. python setup.py sdist
  12. untar from dist folder into a new folder elsewhere
  13. Check contents (NOTE if filenames have changed, sdist cache may use old name -- delete caches)
  14. Within dist folder, python setup.py test
  15. If all pass, delete folder and return to module directory
  16. git tag -a VERSIONrc0 -m "Test deployment for version VERSIONrc0" (such as 0.1.0rc0)
  17. git push origin VERSIONa0
  18. Wait for CI build to complete
  19. twine upload -r testpypi dist/FILEWITHCORRECTVERSION (it will ask for login info)
  20. Check/Change version number in setup.py to VERSION
  21. Check CHANGELOG Dates and info
  22. Commit changes
  23. git push
  24. Wait for CI build to complete
  25. python setup.py sdist
  26. git tag -a VERSION -m "Version 0.1.0"
  27. git push origin VERSION
  28. Wait for CI build to complete
  29. twine upload dist/FILEWITHCORRECTVERSION (it will ask for login info)
  30. git checkout master
  31. git pull --all
  32. git merge --no-ff 0.1.X
  33. git push

Preparing Release Candidate (In Fork. Resides in 0.1.X branch)

  1. git checkout 0.1.X
  2. git pull --all
  3. Change version number in setup.py VERSIONrc0
  4. Change version in docs/conf.py if need be
  5. Change shields and badges in README and index.rst (docs) to point to master branch
  6. Clean out dist folder
  7. Clean out docs (e.g. make clean) if applicable
  8. git merge master
  9. Commit changes (if needed)
  10. Wait for CI build to complete
  11. python setup.py sdist
  12. untar from dist folder into a new folder elsewhere
  13. Check contents (NOTE if filenames have changed, sdist cache may use old name -- delete caches)
  14. Within dist folder, python setup.py test
  15. If all pass, delete folder and return to module directory
  16. git tag -a VERSIONrc0 -m "Test deployment for version VERSIONrc0" (such as 0.1.0rc0)
  17. git push origin VERSIONa0
  18. Wait for CI build to complete
  19. twine upload -r testpypi dist/FILEWITHCORRECTVERSION (it will ask for login info)

From 0.1.X to Fork Master

  1. git merge master
  2. Check/Change version number in setup.py to VERSION
  3. Check CHANGELOG Dates and info
  4. Commit changes
  5. git push
  6. git tag -a VERSION -m "Version 0.1.0"
  7. git push origin VERSION
  8. Wait for CI build to complete
  9. python setup.py sdist
  10. twine upload dist/FILEWITHCORRECTVERSION (it will ask for login info)
  11. git checkout master
  12. git pull --all
  13. git merge --no-ff 0.1.X
  14. git push
  15. (Optional) Retire the VERSION 0.1.X branch

From Fork to Main

  1. Setup PR on GitHub on Main Repo from Fork
  2. Let CI Complete
  3. Merge PR on Github
  4. Locally, checkout master
  5. git pull --all

Publish new docs

  1. In fork master branch, rebuild docs
  2. Copy html in build folder into pages-specific repo
  3. Commit changes
  4. push to orphan branch

Setup branches for next minor updates

  1. In main repo (not fork), git checkout 0.1.X
  2. git pull --all
  3. git merge master
  4. Change version number in setup.py VERSION**+1a0**
  5. Add new entry for 0.1.1 to CHANGELOG
  6. Change version in docs/conf.py if need be
  7. Change shields and badges in README and index.rst (docs) to point to 0.1.X branch
  8. Commit changes
  9. Perform PR Merge from Main to Fork 0.1.X branch
  10. Locally in fork, git checkout 0.1.X
  11. git pull --all

SETUP NEXT BRANCH

  1. git checkout -b 0.2.X
  2. Change badges in README.rst to point to 0.2.X
  3. Change version in setup.py to 0.2.0a0
  4. Add new entry for 0.2.0 to CHANGELOG.rst
  5. git push -u origin 0.2.X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment