From 451dd07bd1cf954d590be6e1ca6b2aea4a3ff670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivo=20Fa=C3=A7oco?= Date: Mon, 2 Dec 2024 10:40:27 +0000 Subject: [PATCH] fix: only run hooks on tag push to main --- .github/workflows/python-publish.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index a9ab2b7..0982eaf 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,6 +9,9 @@ name: Upload Python Package on: + push: + branches: + - "main" release: types: [published] @@ -17,8 +20,8 @@ permissions: jobs: release-build: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 @@ -39,6 +42,7 @@ jobs: path: dist/ pypi-publish: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest timeout-minutes: 5 needs: