haystack
haystack copied to clipboard
Add GitHub action for PyPI releases
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
- 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.
- Create a new branch for release preparations
- Update version in haystack/VERSION.txt
- Copy docs folder
- Install Haystack from source with all dependencies
pip install -e '.[all]' - Run
.github/utils/generate_openapi_specs.py - Run
.github/utils/generate_json_schema.py - Check plausability of schema updates
- Push changes
git push --follow-tags - Create git tag
git tag -a vx.y.z -m "vx.y.z"and push - Run
python3 -m pip install --upgrade build - Run
python3 -m build - Check readme
twine check dist/farm_haystack-x.y.z.tar.gz - Upload to PyPI
twine upload dist/* - 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. 🎉