Skip to content

Commit aaae4d3

Browse files
authored
Merge pull request #1216 from google/py-fix-build-gh
gh: avoid trigger pypi deployments for every PR
2 parents aa999b4 + a1f3c7e commit aaae4d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/python-build-and-release-package.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ jobs:
359359
# Note: The publishing is only done with pushes of release tags.
360360
publish-to-pypi:
361361
name: Publish to PyPI
362+
if: github.event_name == 'push' && github.ref_type == 'tag' && contains(github.ref_name, 'python')
362363
needs: [test-wheels, test-pure-python-wheel, test-sdist]
363364
runs-on: ubuntu-latest
364365

@@ -398,6 +399,7 @@ jobs:
398399
# Note: The publishing is only done with pushes of test release tags.
399400
publish-to-testpypi:
400401
name: Publish to TestPyPI
402+
if: github.event_name == 'push' && github.ref_type == 'tag' && contains(github.ref_name, 'python')
401403
needs: [test-wheels, test-pure-python-wheel, test-sdist]
402404
runs-on: ubuntu-latest
403405

0 commit comments

Comments
 (0)