haystack/.github/workflows/pypi_release.yml
Tobias Wochinger ba49905eff
ci: unify dependency management + hatch scripts (#7079)
* ci: unify dependency management + hatch scripts

* ci: migrate readme sync

* build: migrate snippets

* ci: pin hatch

* ci: make Python version more explicit + quote

* ci: add scripts with parameters to hatch

---------

Co-authored-by: Silvano Cerza <3314350+silvanocerza@users.noreply.github.com>
2024-02-26 15:40:10 +01:00

41 lines
918 B
YAML

name: Project release on PyPi
on:
push:
tags:
- "v[0-9].[0-9]+.[0-9]+*"
env:
HATCH_VERSION: "1.9.3"
jobs:
release-on-pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Hatch
run: pip install hatch==${{ env.HATCH_VERSION }}
- name: Build Haystack
run: hatch build
- name: Publish on PyPi
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.HAYSTACK_AI_PYPI_TOKEN }}
run: hatch publish -y
- name: Notify Slack
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
VERSION: ${{ github.ref_name }}
if: always()
uses: act10ns/slack@v2
with:
status: ${{ job.status }}
channel: "#haystack-notifications"
config: .github/config/pypi-release-slack-notification.yml