From dc169b83af11d6e3f33d5c4a90f4a1c97db7dab3 Mon Sep 17 00:00:00 2001 From: AnesBenmerzoug Date: Sun, 3 Nov 2024 20:33:01 +0100 Subject: [PATCH] Prevent publishing to testpypi on pull requests to main branch --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fea189..7ad3f10 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -65,7 +65,7 @@ jobs: name: Publish package to TestPyPI runs-on: ubuntu-latest needs: [code-quality, tests] - if: ${{ github.ref == 'refs/heads/main' }} + if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }} concurrency: group: publish-testpypi permissions: