From 233a96c19112dee93f6e571f7ab539617626da62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dario=20Cambi=C3=A9?= Date: Mon, 4 Oct 2021 23:36:42 +0200 Subject: [PATCH] Further fine tuning to CD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit P.S. it’ll publish any push to TestPyPI which is useful for providing test builds to your alpha users as well as making sure that your release pipeline remains healthy! Signed-off-by: Dario Cambié --- .github/workflows/publish_pypi.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 4caae23b..18a65e7a 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -1,5 +1,7 @@ name: Publish Python 🐍 distributions 📦 to PyPI -on: push +on: + push: + branches: [main] jobs: build-n-publish: @@ -23,8 +25,9 @@ jobs: user: dcambie password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ + skip_existing: true - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags/releases/') uses: pypa/gh-action-pypi-publish@master with: user: __token__