From 97a4ddda4b0c3059a0979ae2acad8828d3ebfd68 Mon Sep 17 00:00:00 2001 From: fedebenelli Date: Wed, 30 Oct 2024 10:31:55 -0300 Subject: [PATCH] publish to PyPI on each tag --- .github/workflows/ci.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1a3c6..b1f5614 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,4 +66,27 @@ jobs: - name: Install tox run: pip install tox tox-gh-actions - name: Test with tox - run: tox -r \ No newline at end of file + run: tox -r + + publish-to-pypi: + name: >- + Publish Python 🐍 distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - test-linux + - test-windows + - test-macos + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/ugropy + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file