chore: π Update SDK - Generate 1.1.20 (#56) #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| permissions: | |
| checks: write | |
| contents: write | |
| pull-requests: write | |
| statuses: write | |
| id-token: write | |
| "on": | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - .speakeasy/gen.lock | |
| workflow_dispatch: {} | |
| jobs: | |
| publish: | |
| uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15 | |
| with: | |
| target: textql | |
| secrets: | |
| github_access_token: ${{ secrets.GH_PAT }} | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }} | |
| sync-python-sdk-docs: | |
| needs: [publish] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate docs dispatch bot token | |
| id: docs-app-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| app-id: ${{ secrets.SDK_DISPATCH_APP_ID }} | |
| private-key: ${{ secrets.SDK_DISPATCH_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: demo2 | |
| permission-contents: write | |
| permission-pull-requests: write | |
| - name: Checkout Python SDK | |
| uses: actions/checkout@v4 | |
| with: | |
| path: sdk | |
| - name: Checkout TextQL docs | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: TextQLLabs/demo2 | |
| token: ${{ steps.docs-app-token.outputs.token }} | |
| path: demo2 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Render Mintlify release log | |
| run: | | |
| python3 sdk/scripts/render_mintlify_releases.py \ | |
| sdk/RELEASES.md \ | |
| demo2/docs/public/api-reference/sdk/changelog.mdx | |
| - name: Create or update docs pull request | |
| id: docs-pr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ steps.docs-app-token.outputs.token }} | |
| path: demo2 | |
| add-paths: | | |
| docs/public/api-reference/sdk/changelog.mdx | |
| branch: automation/python-sdk-docs | |
| delete-branch: true | |
| commit-message: "docs: sync Python SDK reference" | |
| title: "docs: sync Python SDK reference" | |
| body: | | |
| Automated after a successful Python SDK publish. | |
| - Updates the Python SDK release log from `TextQLLabs/textql-python-v3/RELEASES.md`. | |
| - Shared OpenAPI, code-sample, wrapper, and navigation files are owned by the TypeScript docs sync to avoid competing generated PRs. | |
| - name: Auto-merge docs pull request after checks pass | |
| if: steps.docs-pr.outputs.pull-request-number != '' | |
| env: | |
| GH_TOKEN: ${{ steps.docs-app-token.outputs.token }} | |
| DOCS_PR_NUMBER: ${{ steps.docs-pr.outputs.pull-request-number }} | |
| run: | | |
| gh pr merge "$DOCS_PR_NUMBER" \ | |
| --repo TextQLLabs/demo2 \ | |
| --auto \ | |
| --squash |