From c8e73d36af236c345bbbbb1d9bcd21c0bdc4d89e Mon Sep 17 00:00:00 2001 From: Akshay Karle <1443108+akshaykarle@users.noreply.github.com> Date: Mon, 14 Oct 2024 11:32:25 +0100 Subject: [PATCH] run publish workflow only on tags --- .github/workflows/publish.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6711eaf..52c9ae1 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,14 +4,11 @@ on: workflow_run: workflows: [Build] types: [completed] - push: - tags: - - v** jobs: publish-pypi: name: Publish to PyPI - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ startsWith(github.ref, 'refs/tags/') && github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest permissions: id-token: write # IMPORTANT: mandatory for trusted publishing