From 2c8c224e62c871b7e3d2800e43a0df5b7abf8510 Mon Sep 17 00:00:00 2001 From: Pablo Pardo Garcia Date: Wed, 15 Jul 2026 18:23:18 +0200 Subject: [PATCH] ci: dispatch the docs API-reference bump on release MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a successful PyPI publish, fire a repository_dispatch (sdk-release, payload: version) at glassflow/argus-docs; its bump-api-reference workflow opens the pin-bump + regenerated-reference PR. Skips gracefully until DOCS_DISPATCH_TOKEN is configured (a fine-grained PAT with contents:write on argus-docs; GITHUB_TOKEN cannot dispatch cross-repo) — the docs side has a weekly scheduled fallback either way. --- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fdcc66d..e735b4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,34 @@ jobs: - run: uv build - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 + # Tell argus-docs a new version shipped: its bump-api-reference workflow + # opens the pin-bump + regenerated-reference PR. Fires only after the PyPI + # publish succeeded (the docs workflow pip-installs the version). Needs + # DOCS_DISPATCH_TOKEN — a fine-grained PAT (or GitHub App token) with + # contents:write on glassflow/argus-docs; GITHUB_TOKEN cannot dispatch + # cross-repo. Skips gracefully while the secret is unset (the docs + # workflow's weekly schedule is the fallback). + dispatch-docs: + needs: [release-please, publish] + if: ${{ needs.release-please.outputs.release_created == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Dispatch the docs API-reference bump + env: + TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} + TAG: ${{ needs.release-please.outputs.tag_name }} + run: | + if [ -z "$TOKEN" ]; then + echo "DOCS_DISPATCH_TOKEN not configured; skipping (the docs weekly fallback will catch up)." >> "$GITHUB_STEP_SUMMARY" + exit 0 + fi + version="${TAG#v}" + curl -sS --fail-with-body -X POST \ + -H "Authorization: Bearer $TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/glassflow/argus-docs/dispatches \ + -d "{\"event_type\":\"sdk-release\",\"client_payload\":{\"version\":\"$version\"}}" + # Announce on Slack AFTER the PyPI publish succeeds, so the channel only # ever sees releases that actually shipped. A separate `on: release` # workflow would never fire: release-please creates the GitHub Release with