diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3e7588b..edf094e 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -8,9 +8,15 @@ name: python-publish +# Triggered by the tag push itself, not by the GitHub Release. +# python-packages.yml creates that Release using GITHUB_TOKEN, and GitHub's +# anti-recursion rule means events produced by GITHUB_TOKEN never start another +# workflow — so `release: published` silently never fired here and the package +# was never uploaded, while every other check went green. on: - release: - types: [published] + push: + tags: + - "v[0-9]+*" workflow_dispatch: permissions: @@ -20,7 +26,7 @@ jobs: deploy: if: >- github.repository == 'WaveSpeedAI/wavespeed-python' && - ((github.event_name == 'release' && github.ref_type == 'tag' && + ((github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')) || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main')) runs-on: ubuntu-latest