Skip to content

Commit a698e2c

Browse files
committed
Only publish to Test PyPI for tags
1 parent b015568 commit a698e2c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This workflow is triggered two ways:
22
#
3-
# 1. When a commit is made, the workflow will upload the package to
3+
# 1. When a tag is created, the workflow will upload the package to
44
# test.pypi.org.
55
# 2. When a release is made, the workflow will upload the package to pypi.org.
66
#
@@ -34,13 +34,13 @@ jobs:
3434

3535
- uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2.17.0
3636

37-
# Publish to Test PyPI on every commit on main.
37+
# Publish to Test PyPI for every tag.
3838
release-test-pypi:
3939
name: Publish in-dev package to test.pypi.org
4040
if: |
4141
github.repository_owner == 'python'
4242
&& github.event_name == 'push'
43-
&& github.ref == 'refs/heads/main'
43+
&& startsWith(github.ref, 'refs/tags/')
4444
runs-on: ubuntu-latest
4545
needs: build-package
4646

0 commit comments

Comments
 (0)