From c37e2795d133da586cbae428e0ce29a8593dca1c Mon Sep 17 00:00:00 2001 From: Bradley Reynolds Date: Tue, 13 Aug 2024 04:39:25 +0000 Subject: [PATCH] Check if even is release directly in CI Signed-off-by: GitHub --- .github/workflows/python-publish-pypi.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-publish-pypi.yaml b/.github/workflows/python-publish-pypi.yaml index fd28bab..1e0bb79 100644 --- a/.github/workflows/python-publish-pypi.yaml +++ b/.github/workflows/python-publish-pypi.yaml @@ -25,12 +25,12 @@ jobs: - name: Build and inspect Python 🐍 package 📦 uses: hynek/build-and-inspect-python-package@2dbbf2b252d3a3c7cec7a810e3ed5983bd17b13a # v2.8.0 with: - attest-build-provenance-github: ${{ startswith(github.event.ref, 'refs/tags/') }} + attest-build-provenance-github: ${{ github.event.action == 'published' }} publish-to-pypi: name: Publish Python 🐍 distribution 📦 to PyPI needs: build - if: ${{ startswith(github.event.ref, 'refs/tags/') }} + if: ${{ github.event.action == 'published' }} runs-on: ubuntu-latest environment: name: pypi