Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
Expand All @@ -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 -
Loading