From e7e97b99b0344bd45b7504949e24680c0ef52fe0 Mon Sep 17 00:00:00 2001 From: Andrew Cassidy Date: Sun, 11 Apr 2021 21:36:43 -0700 Subject: [PATCH] Update python-publish.yml --- .github/workflows/python-publish.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 }}