Skip to content

Commit c542163

Browse files
CI: Fix tag serach value for TestPyPI publishing
* As the tag events that trigger workflows are not prefixed by 'v' but instead just use SemVer numbers the GitHub Actions `startsWith` function can only check if a tag has been pushed, as `startsWith` does not support regex. - c.f. https://docs.github.com/en/actions/learn-github-actions/expressions#startswith
1 parent 31aec62 commit c542163

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/publish-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
# Publish to TestPyPI on tag events of if manually triggered
9292
# Compare to 'true' string as booleans get turned into strings in the console
9393
if: >-
94-
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v'))
94+
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))
9595
|| (github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true')
9696
uses: pypa/gh-action-pypi-publish@v1.8.10
9797
with:

0 commit comments

Comments
 (0)