Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | name: Update published API client |
| 2 | |
| 3 | on: |
| 4 | repository_dispatch: |
| 5 | types: [composio-client-published] |
| 6 | schedule: |
| 7 | - cron: '23 * * * *' |
| 8 | workflow_dispatch: |
| 9 | |
| 10 | permissions: |
| 11 | contents: read |
| 12 | |
| 13 | concurrency: |
| 14 | group: update-composio-client |
| 15 | cancel-in-progress: false |
| 16 | |
| 17 | jobs: |
| 18 | prepare: |
| 19 | if: >- |
| 20 | github.repository == 'ComposioHQ/composio' && |
| 21 | github.ref == 'refs/heads/next' && |
| 22 | (github.event_name != 'repository_dispatch' || github.actor == 'sdkrelease[bot]') |
| 23 | runs-on: ubuntu-latest |
| 24 | outputs: |
| 25 | changed: ${{ steps.update.outputs.changed }} |
| 26 | version: ${{ steps.update.outputs.version }} |
| 27 | steps: |
| 28 | - name: Checkout trusted release branch |
| 29 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 30 | with: |
| 31 | ref: next |
| 32 | fetch-depth: 0 |
| 33 | persist-credentials: false |
| 34 | |
| 35 | - name: Setup Node.js, pnpm, Bun |
| 36 | uses: ./.github/actions/setup-node-pnpm-bun |
| 37 | |
| 38 | - name: Setup Python and uv |
| 39 | uses: ./.github/actions/setup-python-uv |
| 40 | |
| 41 | - name: Install trusted tooling without lifecycle scripts |
| 42 | run: pnpm install --frozen-lockfile --ignore-scripts |
| 43 | |
| 44 | - name: Verify registries and prepare dependency update |
| 45 | id: update |
| 46 | run: bun scripts/update-composio-client.ts prepare |
| 47 | |
| 48 | - name: Validate SDK changeset |
| 49 | if: steps.update.outputs.changed == 'true' |
| 50 | run: pnpm validate:changesets |
| 51 | |
| 52 | - name: Transfer only the prepared update |
| 53 | if: steps.update.outputs.changed == 'true' |
| 54 | uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 |
| 55 | with: |
| 56 | name: client-update |
| 57 | path: .artifacts/client-update/update.json |
| 58 | include-hidden-files: true |
| 59 | if-no-files-found: error |
| 60 | retention-days: 1 |
| 61 | |
| 62 | publish: |
| 63 | needs: prepare |
| 64 | if: needs.prepare.result == 'success' && needs.prepare.outputs.changed == 'true' |
| 65 | runs-on: ubuntu-latest |
| 66 | steps: |
| 67 | - name: Checkout trusted release branch |
| 68 | uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 69 | with: |
| 70 | ref: next |
| 71 | persist-credentials: false |
| 72 | |
| 73 | - name: Setup Node.js, pnpm, Bun |
| 74 | uses: ./.github/actions/setup-node-pnpm-bun |
| 75 | |
| 76 | - name: Install trusted tooling without lifecycle scripts |
| 77 | run: pnpm install --frozen-lockfile --ignore-scripts |
| 78 | |
| 79 | - name: Download prepared update |
| 80 | uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 |
| 81 | with: |
| 82 | name: client-update |
| 83 | path: .artifacts/client-update |
| 84 | |
| 85 | - name: Apply allowlisted files after checking the base revision |
| 86 | run: bun scripts/update-composio-client.ts apply |
| 87 | |
| 88 | # The App key is available only after registry access and lock generation. |
| 89 | # App-created PRs trigger the SDK and CLI checks under normal branch protection. |
| 90 | - name: Generate scoped SDKRelease token |
| 91 | id: app-token |
| 92 | uses: actions/create-github-app-token@64ab729a6294000f5aa4a4bc0b73d1f32bc45510 # v3.3.0 |
| 93 | with: |
| 94 | client-id: ${{ vars.RELEASE_BOT_CLIENT_ID }} |
| 95 | private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }} |
| 96 | owner: ComposioHQ |
| 97 | repositories: composio |
| 98 | permission-contents: write |
| 99 | permission-pull-requests: write |
| 100 | |
| 101 | - name: Create or update dependency PR |
| 102 | uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 |
| 103 | with: |
| 104 | token: ${{ steps.app-token.outputs.token }} |
| 105 | branch: chore/update-composio-client |
| 106 | base: next |
| 107 | commit-message: 'chore(sdk): update composio-client to ${{ needs.prepare.outputs.version }}' |
| 108 | title: 'chore(sdk): update composio-client to ${{ needs.prepare.outputs.version }}' |
| 109 | body: | |
| 110 | Update the shared TypeScript SDK/CLI catalog and Python SDK pins to |
| 111 | composio-client ${{ needs.prepare.outputs.version }}, with regenerated pnpm/uv locks. |
| 112 | |
| 113 | The updater verified the exact stable version on both |
| 114 | [npm](https://www.npmjs.com/package/@composio/client/v/${{ needs.prepare.outputs.version }}) and |
| 115 | [PyPI](https://pypi.org/project/composio-client/${{ needs.prepare.outputs.version }}/). |
| 116 | Includes the SDK patch changeset and CLI release note. |
| 117 | |
| 118 | [Preparation run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) |
| 119 | add-paths: | |
| 120 | pnpm-workspace.yaml |
| 121 | pnpm-lock.yaml |
| 122 | python/pyproject.toml |
| 123 | python/setup.py |
| 124 | uv.lock |
| 125 | .changeset/composio-client-update.md |
| 126 | ts/packages/cli/CHANGELOG.md |