From fbd1d8c1cf03496423de467f99c666a8ac4bc0ec Mon Sep 17 00:00:00 2001 From: Alex Rogozhnikov Date: Mon, 9 Sep 2024 05:14:17 +0000 Subject: [PATCH] add workflow to auto-deploy to pypi on tag creation --- .github/workflows/publish-to-pypi.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..431edf2 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,27 @@ +name: Deploy to pypi + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + pip install . && pip install hatch + - name: Publish to PyPi + env: + HATCH_INDEX_USER: "__token__" + HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }} + run: | + hatch build --clean && hatch publish