Skip to content

Commit

Permalink
ci: Publish job to run only if release job indicate a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongfi91 committed Nov 19, 2024
1 parent f452887 commit 9ff9cc6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:

continue-on-error: true

outputs:
released: ${{ steps.release.outputs.released }}

steps:
# Note: we need to checkout the repository at the workflow sha in case during the workflow
# the branch was updated. To keep PSR working with the configured release branches,
Expand Down Expand Up @@ -93,7 +96,7 @@ jobs:

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: ${{ success() }}
if: ${{ needs.release.outputs.released == 'true' }}
needs:
- release
runs-on: ubuntu-latest
Expand Down

0 comments on commit 9ff9cc6

Please sign in to comment.