name: Update published API client on: repository_dispatch: types: [composio-client-published] schedule: - cron: '23 * * * *' workflow_dispatch: permissions: contents: read concurrency: group: update-composio-client cancel-in-progress: false jobs: prepare: if: >- github.repository == 'ComposioHQ/composio' && github.ref == 'refs/heads/next' && (github.event_name != 'repository_dispatch' || github.actor == 'sdkrelease[bot]') runs-on: ubuntu-latest outputs: changed: ${{ steps.update.outputs.changed }} version: ${{ steps.update.outputs.version }} steps: - name: Checkout trusted release branch uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: next fetch-depth: 0 persist-credentials: false - name: Setup Node.js, pnpm, Bun uses: ./.github/actions/setup-node-pnpm-bun - name: Setup Python and uv uses: ./.github/actions/setup-python-uv - name: Install trusted tooling without lifecycle scripts run: pnpm install --frozen-lockfile --ignore-scripts - name: Verify registries and prepare dependency update id: update run: bun scripts/update-composio-client.ts prepare - name: Validate SDK changeset if: steps.update.outputs.changed == 'true' run: pnpm validate:changesets - name: Transfer only the prepared update if: steps.update.outputs.changed == 'true' uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: client-update path: .artifacts/client-update/update.json include-hidden-files: true if-no-files-found: error retention-days: 1 publish: needs: prepare if: needs.prepare.result == 'success' && needs.prepare.outputs.changed == 'true' runs-on: ubuntu-latest steps: - name: Checkout trusted release branch uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: next persist-credentials: false - name: Setup Node.js, pnpm, Bun uses: ./.github/actions/setup-node-pnpm-bun - name: Install trusted tooling without lifecycle scripts run: pnpm install --frozen-lockfile --ignore-scripts - name: Download prepared update uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: name: client-update path: .artifacts/client-update - name: Apply allowlisted files after checking the base revision run: bun scripts/update-composio-client.ts apply # The App key is available only after registry access and lock generation. # App-created PRs trigger the SDK and CLI checks under normal branch protection. - name: Generate scoped SDKRelease token id: app-token uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 with: client-id: ${{ vars.RELEASE_BOT_CLIENT_ID }} private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }} owner: ComposioHQ repositories: composio permission-contents: write permission-pull-requests: write - name: Create or update dependency PR uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 with: token: ${{ steps.app-token.outputs.token }} branch: chore/update-composio-client base: next commit-message: 'chore(sdk): update composio-client to ${{ needs.prepare.outputs.version }}' title: 'chore(sdk): update composio-client to ${{ needs.prepare.outputs.version }}' body: | Update the shared TypeScript SDK/CLI catalog and Python SDK pins to composio-client ${{ needs.prepare.outputs.version }}, with regenerated pnpm/uv locks. The updater verified the exact stable version on both [npm](https://www.npmjs.com/package/@composio/client/v/${{ needs.prepare.outputs.version }}) and [PyPI](https://pypi.org/project/composio-client/${{ needs.prepare.outputs.version }}/). Includes the SDK patch changeset and CLI release note. [Preparation run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) add-paths: | pnpm-workspace.yaml pnpm-lock.yaml python/pyproject.toml python/setup.py uv.lock .changeset/composio-client-update.md ts/packages/cli/CHANGELOG.md