From cc31cd070d9b4b843968a0da2af56c05ccc0ab1f Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Tue, 14 Feb 2023 13:47:25 -0600 Subject: [PATCH] Enable the publish workflow for PRs created in the main repo The publish workflow was previously disabled for PRs in commit d1945c5ba8537811e49f1fd5c5b5793e83f0d04d --- .github/workflows/publish.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a0781dde..78e7bb66 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,13 @@ on: - src/** - setup.py - .github/workflows/publish.yml + pull_request: + branches: + - 'master' + paths: + - src/** + - setup.py + - .github/workflows/publish.yml jobs: publish: @@ -67,8 +74,8 @@ jobs: twine check dist/* twine upload --verbose dist/* - - name: Publish PR to Test PyPI - if: github.event_name == 'pull_request' + - name: Publish Repo PR to Test PyPI + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }}