From 7b776d1048f5e98c35b0619bcecc4621c9dce1e7 Mon Sep 17 00:00:00 2001 From: Michael Shin Date: Wed, 25 Nov 2026 11:53:25 -0500 Subject: [PATCH] [CI] Request SDK upgrade after publishing API client --- .github/workflows/publish.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b734509..c3dcb33 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,6 +8,7 @@ jobs: publish: runs-on: ubuntu-latest permissions: + contents: read id-token: write steps: - uses: actions/checkout@v3 @@ -33,3 +34,17 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://upload.pypi.org/legacy/ + - name: Request SDK upgrade + env: + # Needs Contents: write on CentML/centml-python-client to dispatch. + # The SDK repository also needs this secret with Pull requests: write. + GH_TOKEN: ${{ secrets.SDK_UPDATE_TOKEN }} + CLIENT_VERSION: ${{ github.event.release.tag_name }} + run: | + if [ -z "$GH_TOKEN" ]; then + echo "::error::Configure SDK_UPDATE_TOKEN with access to CentML/centml-python-client. See https://github.com/CentML/centml-python-client#automated-platform-api-client-updates" + exit 1 + fi + jq -n --arg version "${CLIENT_VERSION#v}" \ + '{event_type: "platform-api-client-published", client_payload: {version: $version}}' \ + | gh api --method POST repos/CentML/centml-python-client/dispatches --input -