From 2f6c2578663087060a39f999987c142a24f6762c Mon Sep 17 00:00:00 2001 From: andrader <38709237+andrader@users.noreply.github.com> Date: Mon, 6 Oct 2025 09:54:34 -0300 Subject: [PATCH] chore: update workflow to trigger on pull request closure and add conditional publishing steps --- .github/workflows/publish.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fa3e069..ca286f3 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,11 +1,14 @@ name: Publish to PyPI on: - push: + pull_request: branches: - main + types: [closed] tags: - 'v*' # Trigger on version tags like v0.3.0, v1.0.0, etc. + + workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -42,6 +45,7 @@ jobs: path: dist/ publish-to-pypi: + if: github.event.pull_request.merged == true name: Publish to PyPI needs: - build @@ -63,6 +67,7 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 github-release: + if: github.event.pull_request.merged == true name: Create GitHub Release needs: - publish-to-pypi