Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
| 1 | name: SDK release candidates |
| 2 | run-name: SDK release candidates (${{ github.head_ref }}) |
| 3 | |
| 4 | # Builds and checks the package files a release PR will publish. This workflow only runs on |
| 5 | # pull_request, with a read-only token, no secrets and no caches. The privileged SDK release |
| 6 | # workflow never checks out PR code; after approval and merge, its tag run publishes these exact |
| 7 | # artifacts. |
| 8 | on: |
| 9 | pull_request: |
| 10 | branches: [next] |
| 11 | paths: ['.github/sdk-release-plan.json', 'scripts/sdk-release/**'] |
| 12 | |
| 13 | permissions: |
| 14 | contents: read |
| 15 | actions: read |
| 16 | |
| 17 | jobs: |
| 18 | select-candidates: |
| 19 | if: >- |
| 20 | github.repository == 'ComposioHQ/composio' && |
| 21 | startsWith(github.event.pull_request.head.ref, 'sdk-release/batch-') |
| 22 | runs-on: ubuntu-latest |
| 23 | timeout-minutes: 5 |
| 24 | outputs: |
| 25 | languages: ${{ steps.select.outputs.languages }} |
| 26 | channel: ${{ steps.select.outputs.channel }} |
| 27 | steps: |
| 28 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 |
| 29 | with: |
| 30 | ref: ${{ github.event.pull_request.head.sha }} |
| 31 | persist-credentials: false |
| 32 | - name: Select planned language lanes |
| 33 | id: select |
| 34 | run: | |
| 35 | node --input-type=module <<'JS' |
| 36 | import { readFileSync, appendFileSync } from 'node:fs'; |
| 37 | const batch = JSON.parse(readFileSync('.github/sdk-release-plan.json', 'utf8')); |
| 38 | const languages = [...new Set(batch.plan.releases.map(release => release.language))]; |
| 39 | // Languages reach shell steps through the matrix, so accept only known values. |
| 40 | if (!languages.every(language => ['typescript', 'python'].includes(language))) throw new Error('Unknown release language'); |
| 41 | const channel = batch.plan.choices.channel ?? 'stable'; |
| 42 | if (!['stable', 'beta'].includes(channel)) throw new Error('Unknown release channel'); |
| 43 | appendFileSync(process.env.GITHUB_OUTPUT, `languages=${JSON.stringify(languages)}\nchannel=${channel}\n`); |
| 44 | JS |
| 45 | |
| 46 | candidate: |
| 47 | # The release merge requires this check name to pass on the approved head. |
| 48 | name: SDK candidate (${{ matrix.language }}) |
| 49 | needs: select-candidates |
| 50 | runs-on: ubuntu-latest |
| 51 | timeout-minutes: 30 |
| 52 | strategy: |
| 53 | fail-fast: false |
| 54 | matrix: |
| 55 | language: ${{ fromJSON(needs.select-candidates.outputs.languages) }} |
| 56 | steps: |
| 57 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 |
| 58 | with: |
| 59 | ref: ${{ github.event.pull_request.head.sha }} |
| 60 | persist-credentials: false |
| 61 | - uses: ./.github/actions/setup-node-pnpm-bun |
| 62 | with: |
| 63 | enable-caching: 'false' |
| 64 | - uses: ./.github/actions/setup-python-uv |
| 65 | with: |
| 66 | enable-caching: 'false' |
| 67 | - run: pnpm install --frozen-lockfile --ignore-scripts |
| 68 | - name: Build and check the candidate |
| 69 | env: |
| 70 | SDK_SOURCE_SHA: ${{ github.event.pull_request.head.sha }} |
| 71 | LANGUAGE: ${{ matrix.language }} |
| 72 | run: bun scripts/sdk-release/candidates.ts "$LANGUAGE" |
| 73 | - name: Retain candidate bytes for publication |
| 74 | id: upload |
| 75 | uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 |
| 76 | with: |
| 77 | name: sdk-candidate-${{ matrix.language }} |
| 78 | path: sdk-candidate/${{ matrix.language }}/ |
| 79 | retention-days: 30 |
| 80 | if-no-files-found: error |
| 81 | overwrite: true |
| 82 | - name: Report candidate identity |
| 83 | env: |
| 84 | ARTIFACT_ID: ${{ steps.upload.outputs.artifact-id }} |
| 85 | ARTIFACT_DIGEST: ${{ steps.upload.outputs.artifact-digest }} |
| 86 | SOURCE_SHA: ${{ github.event.pull_request.head.sha }} |
| 87 | SDK_READ_TOKEN: ${{ github.token }} |
| 88 | LANGUAGE: ${{ matrix.language }} |
| 89 | run: bun scripts/sdk-release/candidates.ts report "$LANGUAGE" |
| 90 | |
| 91 | # Installs third-party packages from the registries, so it runs apart from the build job and |
| 92 | # has no upload step. Code it runs still holds this run's runtime token, so the tag run refuses |
| 93 | # any candidate artifact created after the build job finished. |
| 94 | smoke: |
| 95 | # The release merge requires this check name to pass on the approved head. |
| 96 | name: SDK candidate smoke (${{ matrix.language }}) |
| 97 | needs: [select-candidates, candidate] |
| 98 | runs-on: ubuntu-latest |
| 99 | timeout-minutes: 30 |
| 100 | permissions: |
| 101 | contents: read |
| 102 | actions: read |
| 103 | strategy: |
| 104 | fail-fast: false |
| 105 | matrix: |
| 106 | language: ${{ fromJSON(needs.select-candidates.outputs.languages) }} |
| 107 | steps: |
| 108 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 |
| 109 | with: |
| 110 | ref: ${{ github.event.pull_request.head.sha }} |
| 111 | persist-credentials: false |
| 112 | - uses: ./.github/actions/setup-node-pnpm-bun |
| 113 | with: |
| 114 | enable-caching: 'false' |
| 115 | - uses: ./.github/actions/setup-python-uv |
| 116 | with: |
| 117 | enable-caching: 'false' |
| 118 | - run: pnpm install --frozen-lockfile --ignore-scripts |
| 119 | - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 |
| 120 | with: |
| 121 | name: sdk-candidate-${{ matrix.language }} |
| 122 | path: sdk-candidate/${{ matrix.language }} |
| 123 | - name: Install and import the candidate like a user |
| 124 | env: |
| 125 | LANGUAGE: ${{ matrix.language }} |
| 126 | run: bun scripts/sdk-release/consumers.ts "sdk-candidate/$LANGUAGE" |
| 127 | |
| 128 | # Type-checks and builds the docs against the packages this release publishes, not the published |
| 129 | # ones the pull-request docs workflows install. Like the smoke job it runs third-party code with |
| 130 | # this run's runtime token, so it has no upload step and no credentials. |
| 131 | docs: |
| 132 | # The release merge requires this check name to pass on the approved head of a stable release. |
| 133 | name: SDK candidate docs |
| 134 | needs: [select-candidates, candidate] |
| 135 | # Runs even when the Python candidate fails, so its result still reaches the reviewers. |
| 136 | if: ${{ !cancelled() && needs.select-candidates.outputs.channel == 'stable' }} |
| 137 | runs-on: ubuntu-latest |
| 138 | timeout-minutes: 45 |
| 139 | permissions: |
| 140 | contents: read |
| 141 | steps: |
| 142 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 |
| 143 | with: |
| 144 | ref: ${{ github.event.pull_request.head.sha }} |
| 145 | persist-credentials: false |
| 146 | - uses: ./.github/actions/setup-node-pnpm-bun |
| 147 | with: |
| 148 | enable-caching: 'false' |
| 149 | - run: pnpm install --frozen-lockfile --ignore-scripts |
| 150 | - if: contains(fromJSON(needs.select-candidates.outputs.languages), 'typescript') |
| 151 | uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 |
| 152 | with: |
| 153 | name: sdk-candidate-typescript |
| 154 | path: sdk-candidate/typescript |
| 155 | - name: Install the docs against the candidate packages |
| 156 | run: bun scripts/sdk-release/candidate-registry.ts sdk-candidate/typescript |
| 157 | - name: Lint TypeScript |
| 158 | working-directory: docs |
| 159 | run: bun run lint |
| 160 | - name: TypeScript type check |
| 161 | working-directory: docs |
| 162 | run: bun run types:check |
| 163 | - name: Check TypeScript snippet and KB language-option regressions |
| 164 | working-directory: docs |
| 165 | run: bun test tests/static/typescript-snippets.test.ts tests/static/kb-generation.test.ts |
| 166 | - name: Check authored TypeScript outside Twoslash build coverage |
| 167 | working-directory: docs |
| 168 | run: bun run check:typescript-snippets |
| 169 | - name: Build (validates Twoslash TypeScript code blocks) |
| 170 | working-directory: docs |
| 171 | run: bun run build |