From 18cc08bc21e38bef2f5ed56e31daee4c9404732a Mon Sep 17 00:00:00 2001 From: Peter Corke Date: Mon, 10 Aug 2026 18:33:50 +1000 Subject: [PATCH] fix: release-please never triggered the actual PyPI publish release.yml's `on: release: types: [created]` trigger has never fired for any release -- confirmed by zero runs in its history and PyPI sitting on 2.0.1 while GitHub had already tagged 2.1.0 weeks ago. Root cause: release-please-action authenticates with GITHUB_TOKEN, and GitHub Actions doesn't let GITHUB_TOKEN-triggered events start other workflows (anti-recursion rule); only workflow_dispatch and repository_dispatch are exempt. Fix: explicitly dispatch release.yml against the new release's tag once release-please-action reports a release was created, rather than relying on the release event to do it. Must target the tag specifically, not the main branch -- the pypi deploy environment's protection rules only allow deploys from refs matching v*. Manually backfilled 2.1.0 and 2.2.0 to PyPI via workflow_dispatch while diagnosing this; both are live now. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/release-please.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index f29f9405..f00a76cb 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,12 +7,34 @@ on: permissions: contents: write pull-requests: write + actions: write jobs: release-please: runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@v4 + id: release with: config-file: release-please-config.json manifest-file: .release-please-manifest.json + + # release-please-action authenticates with GITHUB_TOKEN, and GitHub + # Actions doesn't let events triggered by GITHUB_TOKEN (like the + # `release` this action creates) start other workflows -- only + # workflow_dispatch/repository_dispatch are exempt from that + # anti-recursion rule. So dispatch release.yml explicitly here + # instead of relying on its `on: release: types: [created]` trigger, + # which never fires as a result. + # + # Must dispatch against the release tag, not the main branch: the + # `pypi` deploy environment's protection rules only allow deploys + # from refs matching `v*` (a tag), so `--ref main` gets rejected at + # the publish step even though build/smoke-test pass. + - name: Trigger PyPI publish + if: ${{ steps.release.outputs.releases_created }} + run: | + tag=$(gh release list --limit 1 --json tagName -q '.[0].tagName') + gh workflow run release.yml --ref "$tag" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}