From 1f9696a5e3b58caaa903683a3cb52c122c6307c8 Mon Sep 17 00:00:00 2001 From: Diego Piccinotti Date: Wed, 23 Oct 2024 12:13:17 +0200 Subject: [PATCH] Update GitHub Actions workflow to publish to PyPI only on main branch tag pushes --- .github/workflows/test_build_release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_build_release.yaml b/.github/workflows/test_build_release.yaml index ce54588..457dbb0 100644 --- a/.github/workflows/test_build_release.yaml +++ b/.github/workflows/test_build_release.yaml @@ -88,7 +88,7 @@ jobs: publish-to-pypi: name: >- Publish Python 🐍 distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/') && github.ref_name == 'main' # only publish to PyPI on tag pushes and if the branch is main needs: - build runs-on: ubuntu-latest