Enable the publish workflow for PRs created in the main repo

The publish workflow was previously disabled for PRs in commit
d1945c5ba8
This commit is contained in:
Debanjum Singh Solanky 2023-02-14 13:47:25 -06:00
parent 84322b2a45
commit cc31cd070d

View file

@ -10,6 +10,13 @@ on:
- src/** - src/**
- setup.py - setup.py
- .github/workflows/publish.yml - .github/workflows/publish.yml
pull_request:
branches:
- 'master'
paths:
- src/**
- setup.py
- .github/workflows/publish.yml
jobs: jobs:
publish: publish:
@ -67,8 +74,8 @@ jobs:
twine check dist/* twine check dist/*
twine upload --verbose dist/* twine upload --verbose dist/*
- name: Publish PR to Test PyPI - name: Publish Repo PR to Test PyPI
if: github.event_name == 'pull_request' if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
env: env:
TWINE_USERNAME: __token__ TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }} TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_KEY }}