diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml index 8843de6..62bf8ec 100644 --- a/.github/workflows/build-publish.yml +++ b/.github/workflows/build-publish.yml @@ -2,6 +2,7 @@ name: Publish Python Package on: + pull_request: push: tags: - "[0-9]+.[0-9]+.[0-9]+*" # Tag will be used for version via setuptools_scm, should match version in HISTORY.txt @@ -42,12 +43,14 @@ jobs: run: python -m build - name: Publish to PyPI + if: github.ref_type == 'tag' env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} run: twine upload dist/* # - name: Publish to Test PyPI +# if: github.ref_type == 'tag' # env: # TWINE_USERNAME: __token__ # TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}