CI: Only attempt publish for upstream (#1179)

Only attempt publish for upstream

Co-authored-by: Hynek Schlawack <hs@ox.cx>
This commit is contained in:
Hugo van Kemenade 2023-08-20 13:08:07 +03:00 committed by GitHub
parent a5cbd51fd9
commit 336ea8b691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ jobs:
release-test-pypi:
name: Publish in-dev package to test.pypi.org
environment: release-test-pypi
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: github.repository_owner == 'python-attrs' && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build-package
@ -53,7 +53,7 @@ jobs:
release-pypi:
name: Publish released package to pypi.org
environment: release-pypi
if: github.event.action == 'published'
if: github.repository_owner == 'python-attrs' && github.event.action == 'published'
runs-on: ubuntu-latest
needs: build-package