Skip to content

Commit be5a90d

Browse files
committed
Guard release and PyPI publish steps to only run on tag pushes
Both steps were running on workflow_dispatch from master where github.ref_name is the branch name, not a version tag. This caused the release step to fail which blocked the PyPI publish step entirely.
1 parent 2a77e9a commit be5a90d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
path: dist
8080

8181
- name: Create GitHub Release
82+
if: startsWith(github.ref, 'refs/tags/')
8283
uses: softprops/action-gh-release@v2
8384
with:
8485
files: dist/*
@@ -88,6 +89,7 @@ jobs:
8889
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8990

9091
- name: Publish to PyPI
92+
if: startsWith(github.ref, 'refs/tags/')
9193
uses: pypa/gh-action-pypi-publish@release/v1
9294
with:
9395
verbose: true

0 commit comments

Comments
 (0)