haystack icon indicating copy to clipboard operation
haystack copied to clipboard

Add GitHub action for PyPI releases

Open julian-risch opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. Creating a PyPI release involves the same list of steps every time we have a new release. Manually going through these steps is error-prone and they could be automated instead

Describe the solution you'd like

  1. Add a GitHub action that uses a GitHub secret (to be added) containing PyPI credentials and executes all steps necessary to release a new Haystack version.
  2. Create a new branch for release preparations
  3. Update version in haystack/VERSION.txt
  4. Copy docs folder
  5. Install Haystack from source with all dependencies pip install -e '.[all]'
  6. Run .github/utils/generate_openapi_specs.py
  7. Run .github/utils/generate_json_schema.py
  8. Check plausability of schema updates
  9. Push changes git push --follow-tags
  10. Create git tag git tag -a vx.y.z -m "vx.y.z" and push
  11. Run python3 -m pip install --upgrade build
  12. Run python3 -m build
  13. Check readme twine check dist/farm_haystack-x.y.z.tar.gz
  14. Upload to PyPI twine upload dist/*
  15. Test new release by installing from pip install farm-haystack==x.y.z

Describe alternatives you've considered Keep doing the releases manually is a bad alternative in my opinion because we rotate the responsibility of managing releases and a different environment would be used for every release.

Additional context A bonus would be slack integration that lets us know via slack about the successful release. 🎉

julian-risch avatar Aug 29 '22 15:08 julian-risch