Skip to content

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.1 #12

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.1

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.1 #12

Workflow file for this run

name: Publish
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
id-token: write
on:
push:
branches:
- main
paths:
- RELEASES.md
- '*/RELEASES.md'
jobs:
mint-token:
runs-on: ubuntu-latest
outputs:
api-token: ${{ steps.mint-token.outputs.api-token }}
steps:
- name: Mint API token
id: mint-token
run: |
# retrieve the ambient OIDC token
resp=$(curl -sS --fail -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi")
oidc_token=$(jq -r '.value' <<< "${resp}")
# exchange the OIDC token for an API token
resp=$(curl -sS --fail -X POST https://pypi.org/_/oidc/mint-token -d "{\"token\": \"${oidc_token}\"}")
api_token=$(jq -r '.token' <<< "${resp}")
# see the next step in the workflow for an example of using this step output
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
publish:
needs: mint-token
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ needs.mint-token.outputs.api-token }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}