From 68b95ebf86bd23b6e7423c8459e0cd2b207fd56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sun, 16 May 2021 23:20:09 +0100 Subject: Only try publishing tags. Without this change, setuptools_scm will try to publish PEP 440 local versions to PyPI, which will fail. Also this does not require checking out the full history. --- .github/workflows/pypi.yml | 1 + 1 file changed, 1 insertion(+) (limited to '.github') diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 5882c48..61cf219 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -24,6 +24,7 @@ jobs: run: | python -m build --sdist --wheel --outdir dist/ . - name: Publish package to TestPyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.TEST_PYPI_API_TOKEN }} -- cgit v1.2.3