diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aca018eb5..7f629924c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,9 @@ name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI on: - # Trigger the workflow on push or pull request, - # but only for the main branch - push: - branches: - - master + release: + types: + - published jobs: build-n-publish: @@ -30,7 +28,6 @@ jobs: --sdist --outdir dist/ - name: Publish distribution 📦 to Test PyPI - if: startsWith(github.ref, 'refs/tags/release/') uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.TEST_PYPI_API_TOKEN }}