Skip to content

Commit f299445

Browse files
committed
fix worflow tag when publish
1 parent f6d0c52 commit f299445

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release-python.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
5252
- name: Publish to TestPyPI
5353
uses: pypa/gh-action-pypi-publish@release/v1
54-
if: startsWith(github.ref, 'refs/tags/') && contains(github.ref, '-')
54+
if: startsWith(github.event.workflow_run.head_branch, 'refs/tags/') && contains(github.event.workflow_run.head_branch, '-')
5555
with:
5656
repository-url: https://test.pypi.org/legacy/
5757
skip-existing: true
@@ -61,7 +61,7 @@ jobs:
6161

6262
- name: Publish to PyPI
6363
uses: pypa/gh-action-pypi-publish@release/v1
64-
if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-')
64+
if: startsWith(github.event.workflow_run.head_branch, 'refs/tags/') && !contains(github.event.workflow_run.head_branch, '-')
6565
with:
6666
skip-existing: true
6767
verify-metadata: false

0 commit comments

Comments
 (0)