From b5662a0b81a15cb534911fd02cde431d20074128 Mon Sep 17 00:00:00 2001 From: Ryan Hill Date: Thu, 24 Sep 2026 15:03:12 -0500 Subject: [PATCH] ci: notify qBraid/docs when a release reaches PyPI --- .github/workflows/publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 48ac025..2842c4f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,3 +43,23 @@ jobs: - name: Publish package to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + + notify-docs: + name: Tell qBraid/docs about the release + # Bumps versions.json in qBraid/docs so docs for this release move into the + # Stable docs. Never fails the release. + needs: pypi-publish + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Send package-released event + env: + GH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} + PKG: qbraid-algorithms + run: | + if [ -z "$GH_TOKEN" ]; then echo "DOCS_DISPATCH_TOKEN is not set; skipping"; exit 0; fi + sleep 60 # PyPI's JSON API can trail the upload briefly + VERSION=$(curl -fsSL "https://pypi.org/pypi/${PKG}/json" | jq -r .info.version) + echo "Notifying qBraid/docs: ${PKG} ${VERSION}" + gh api repos/qBraid/docs/dispatches -f event_type=package-released \ + -f "client_payload[package]=${PKG}" -f "client_payload[version]=${VERSION}"