diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index fb75620..61b1c60 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -2,8 +2,11 @@ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries name: Upload Python Package -on: push - +on: + release: + # Only use the types keyword to narrow down the activity types that will trigger your workflow. + types: [published, created, edited] + jobs: deploy: @@ -29,7 +32,6 @@ jobs: password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ - name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }}