diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 608bd78..f3d35fd 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -5,6 +5,11 @@ on: workflows: ["Run Tests"] types: - completed + push: + tags: + - 'v*.*.*' # Trigger the workflow for version tags like 'v1.0.0' + release: + types: [published] # Trigger the workflow when a release is published jobs: test-installation: @@ -63,7 +68,6 @@ jobs: run: echo ${{ github.ref }} - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }}