Skip to content

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.448.2 #37

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.448.2

ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.448.2 #37

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:
tokens:
runs-on: ubuntu-latest
outputs:
pypi-token: ${{ steps.pypi-token.outputs.pypi-token }}
steps:
# Trusted Publisher PyPI token
# See: https://docs.pypi.org/trusted-publishers/using-a-publisher/)
- name: Mint PyPI token
id: pypi-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 "pypi-token=${api_token}" >> "${GITHUB_OUTPUT}"
publish:
needs: tokens
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
secrets:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ needs.tokens.outputs.pypi-token }}
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}