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 22, 23:15 UTC
merge workflow dispatch for builder
Rahul Tarak committed
Jun 26, 2025 at 01:18 UTC
059916a10c3e4b9def1ab42438ec05d1d4616666
1 file changed
+184
.github/workflows/build-cli-binaries.yml
new
+184
@@ -0,0 +1,184 @@
1
+name: Build CLI Binaries
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+ workflow_dispatch:
8
+ inputs:
9
+ version:
10
+ description: 'Version to build (e.g., v1.0.0)'
11
+ required: false
12
+ default: 'dev'
13
+
14
+permissions:
15
+ contents: write
16
+
17
+jobs:
18
+ build-binaries:
19
+ name: Build CLI Binaries
20
+ runs-on: ${{ matrix.runner }}
21
+ strategy:
22
+ matrix:
23
+ include:
24
+ - runner: ubuntu-latest
25
+ platform: linux-x64
26
+ artifact: composio-linux-x64
27
+ - runner: depot-ubuntu-24.04-arm
28
+ platform: linux-aarch64
29
+ artifact: composio-linux-aarch64
30
+ - runner: macos-13 # Intel Mac
31
+ platform: darwin-x64
32
+ artifact: composio-darwin-x64
33
+ - runner: macos-latest # Apple Silicon Mac
34
+ platform: darwin-aarch64
35
+ artifact: composio-darwin-aarch64
36
+
37
+ steps:
38
+ - name: Checkout
39
+ uses: actions/checkout@v4
40
+
41
+ - name: Setup Bun
42
+ uses: oven-sh/setup-bun@v2
43
+ with:
44
+ bun-version: latest
45
+
46
+ - name: Setup pnpm
47
+ uses: pnpm/action-setup@v4
48
+ with:
49
+ version: 10.8.0
50
+
51
+ - name: Setup Node.js
52
+ uses: actions/setup-node@v4
53
+ with:
54
+ node-version: '20'
55
+ cache: 'pnpm'
56
+
57
+ - name: Install dependencies
58
+ run: pnpm install --frozen-lockfile
59
+
60
+ - name: Build packages
61
+ run: pnpm build:packages
62
+
63
+ - name: Build CLI binary
64
+ working-directory: ts/packages/cli
65
+ run: |
66
+ # Use the existing build:bin script which builds for current platform
67
+ pnpm build:bin
68
+
69
+ # Create binaries directory and copy/rename the binary
70
+ mkdir -p dist/binaries
71
+ cp dist/composio dist/binaries/${{ matrix.artifact }}
72
+
73
+ - name: Verify binary
74
+ working-directory: ts/packages/cli
75
+ run: |
76
+ ls -la dist/binaries/${{ matrix.artifact }}
77
+ file dist/binaries/${{ matrix.artifact }}
78
+
79
+ - name: Test binary
80
+ working-directory: ts/packages/cli
81
+ run: |
82
+ ./dist/binaries/${{ matrix.artifact }} --version
83
+ ./dist/binaries/${{ matrix.artifact }} --help | head -5
84
+
85
+ - name: Create archive
86
+ working-directory: ts/packages/cli/dist/binaries
87
+ run: |
88
+ zip ${{ matrix.artifact }}.zip ${{ matrix.artifact }}
89
+ ls -la
90
+
91
+ - name: Upload binary artifact
92
+ uses: actions/upload-artifact@v4
93
+ with:
94
+ name: ${{ matrix.artifact }}
95
+ path: |
96
+ ts/packages/cli/dist/binaries/${{ matrix.artifact }}
97
+ ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
98
+ retention-days: 7
99
+
100
+ - name: Create Release
101
+ if: startsWith(github.ref, 'refs/tags/')
102
+ uses: softprops/action-gh-release@v2
103
+ with:
104
+ files: |
105
+ ts/packages/cli/dist/binaries/${{ matrix.artifact }}.zip
106
+ draft: false
107
+ prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
108
+ generate_release_notes: true
109
+ env:
110
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111
+
112
+ test-installation:
113
+ name: Test Installation
114
+ needs: build-binaries
115
+ if: startsWith(github.ref, 'refs/tags/')
116
+ uses: ./.github/workflows/test-installation.yml
117
+ with:
118
+ version: ${{ github.ref_name }}
119
+
120
+ create-install-instructions:
121
+ name: Create Install Instructions
122
+ needs: build-binaries
123
+ runs-on: ubuntu-latest
124
+ if: startsWith(github.ref, 'refs/tags/')
125
+
126
+ steps:
127
+ - name: Checkout
128
+ uses: actions/checkout@v4
129
+
130
+ - name: Create installation README
131
+ run: |
132
+ cat > INSTALL.md << 'EOF'
133
+ # Composio CLI Installation
134
+
135
+ ## Quick Install (Recommended)
136
+
137
+ ### Linux and macOS
138
+ ```bash
139
+ curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/main/install.sh | bash
140
+ ```
141
+
142
+ ### Install specific version
143
+ ```bash
144
+ curl -fsSL https://raw.githubusercontent.com/ComposioHQ/composio/main/install.sh | bash -s -- ${{ github.ref_name }}
145
+ ```
146
+
147
+ ## Manual Installation
148
+
149
+ 1. Download the appropriate binary for your platform from the [releases page](https://github.com/ComposioHQ/composio/releases)
150
+ 2. Extract the binary
151
+ 3. Move it to a directory in your PATH (e.g., `/usr/local/bin`)
152
+ 4. Make it executable: `chmod +x composio`
153
+
154
+ ## Alternative: npm/pnpm Installation
155
+
156
+ ```bash
157
+ npm install -g @composio/cli
158
+ # or
159
+ pnpm add -g @composio/cli
160
+ ```
161
+
162
+ ## Usage
163
+
164
+ ```bash
165
+ composio --help
166
+ composio login
167
+ composio generate
168
+ ```
169
+
170
+ ## Supported Platforms
171
+
172
+ - Linux x64
173
+ - Linux ARM64
174
+ - macOS x64 (Intel)
175
+ - macOS ARM64 (Apple Silicon)
176
+
177
+ Windows support coming soon!
178
+ EOF
179
+
180
+ - name: Upload install instructions
181
+ uses: actions/upload-artifact@v4
182
+ with:
183
+ name: install-instructions
184
+ path: INSTALL.md
\ No newline at end of file