Skip to content

Commit 885d451

Browse files
authored
ci: add failure check for publish step before tagging (#124)
1 parent a9aa95f commit 885d451

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,14 @@ jobs:
3232
if: ${{ steps.release.outputs.release_created }}
3333
run: python -m build
3434
- name: Publish to PyPI
35+
id: publish
3536
if: ${{ steps.release.outputs.release_created }}
3637
uses: pypa/gh-action-pypi-publish@release/v1
3738
with:
3839
password: ${{ secrets.PYPI_API_TOKEN }}
3940
# https://github.com/googleapis/release-please-action?tab=readme-ov-file#creating-majorminor-tags
4041
- name: Tag versions
41-
if: ${{ steps.release.outputs.release_created }}
42+
if: ${{ steps.release.outputs.release_created && steps.publish.outcome == 'success' }}
4243
run: |
4344
git config user.name github-actions[bot]
4445
git config user.email 41898282+github-actions[bot]@users.noreply.github.com

0 commit comments

Comments
 (0)