-
Notifications
You must be signed in to change notification settings - Fork 4.3k
280 lines (259 loc) · 7.67 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
name: Build and Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
skip_tests:
description: "Skip running tests"
required: false
type: boolean
default: false
jobs:
publish-core:
name: Create Framework & Plugin Releases
defaults:
run:
working-directory: ./python
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build
env:
COMPOSIO_BASE_URL: https://backend.composio.dev/api
COMPOSIO_API_KEY: ${{secrets.COMPOSIO_API_KEY_RELEASE}}
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
# Setup release
python -m pip install --upgrade pip
python -m pip install .
python -m composio.cli apps update
rm README.md
cp ../README.md .
# Build dist
pip install twine build
python -m build
- name: Publish Core to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/dist/
publish-plugins:
needs: publish-core
name: Create Plugin Releases
defaults:
run:
working-directory: ./python
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
package:
[
autogen,
camel,
claude,
crew_ai,
griptape,
julep,
langchain,
llamaindex,
lyzr,
openai,
praisonai,
langgraph,
phidata,
google,
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build ${{ matrix.package }}
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
python -m pip install --upgrade pip
pip install twine build
# Build dist
cd plugins/${{ matrix.package }}
python -m build
- name: Publish ${{ matrix.package }} to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/plugins/${{ matrix.package }}/dist/
publish-swe:
needs: publish-core
name: Create SWE Toolkit Release
defaults:
run:
working-directory: ./python/swe
strategy:
max-parallel: 1
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build
run: |
sudo apt-get update --fix-missing
sudo apt-get autoremove
sudo apt-get autoclean
python -m pip install --upgrade pip
pip install twine build
# Build dist
python -m build
- name: Publish SWE Kit to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/swe/dist/
publish-cli:
name: Build and upload CLI
needs: publish-core
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Build for ${{ matrix.os }}
run: |
python -m pip install --upgrade pip
pip install pyinstaller
cd python/
pip3 install .
# Build CLI
pyinstaller composio/cli/__main__.py
# Ubuntu Release
- if: matrix.os == 'ubuntu-latest'
run: |
cd python/
mv dist/__main__ dist/bin
mv dist/bin/__main__ dist/bin/composio
cd dist/
zip -r composio-linux-amd64.zip bin/*
rm -rf bin/
- if: matrix.os == 'ubuntu-latest'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-linux-amd64.zip
# Mac Intel Release
- if: matrix.os == 'macos-12'
run: |
cd python/
mv dist/__main__ dist/bin
mv dist/bin/__main__ dist/bin/composio
cd dist/
zip -r composio-darwin-amd64.zip bin/*
rm -rf bin/
- if: matrix.os == 'macos-12'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-darwin-amd64.zip
# Mac ARM Release
- if: matrix.os == 'macos-14'
run: |
cd python/
mv dist/__main__ dist/bin
mv dist/bin/__main__ dist/bin/composio
cd dist/
zip -r composio-darwin-arm64.zip bin/*
rm -rf bin/
- if: matrix.os == 'macos-14'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-darwin-arm64.zip
# # Windows release
# - if: matrix.os == 'windows-latest'
# run: |
# cd python/
# mv dist/__main__ dist/bin
# mv dist/bin/__main__.exe dist/bin/composio.exe
# cd dist/
# zip -r composio-win.zip bin/*
# rm -rf bin/
# - if: matrix.os == 'windows-latest'
# name: Upload artifact
# uses: softprops/action-gh-release@v2
# with:
# files: python/dist/composio-win.zip
publish-images:
name: Build and publish docker images
needs: publish-core
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
echo $DOCKER_PASSWORD | docker login --username $DOCKER_USER --password-stdin
- name: Set up support for multi platform build
run: |
docker run --privileged --rm tonistiigi/binfmt --install all
docker buildx create --use --name multibuild
docker buildx inspect --bootstrap
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Publishing tool server images
run: |
cd python/
pip3 install .
cd dockerfiles/
VERSION=$(python -c "from composio import __version__; print(__version__)") make publish
publish-e2b:
name: Publish E2B template
needs: publish-core
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v4
- name: Install E2B
run: |
npm install -g @e2b/cli@latest
- name: Publishing Template
env:
E2B_ACCESS_TOKEN: ${{secrets.E2B_ACCESS_TOKEN}}
run: |
cd python/dockerfiles/
make e2b