Skip to content

Commit

Permalink
Merge pull request #11 from RafaelWO/change/ci-publish-after-test
Browse files Browse the repository at this point in the history
👷 CI: Run publish only if test suite succeeds
  • Loading branch information
RafaelWO authored Dec 24, 2024
2 parents d33243d + 1389ac7 commit 54f1724
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Publish
on:
push:
tags:
- '**'
workflow_run:
workflows: ['Test suite']
types: [completed]

jobs:
pypi-publish:
name: Build package and upload it to PyPI
runs-on: ubuntu-latest
# Run only on tags and if test suite was successful
if: ${{ github.ref_type == 'tag' && github.event.workflow_run.conclusion == 'success' }}
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
Expand Down

0 comments on commit 54f1724

Please sign in to comment.