Skip to content

v0.6.14

v0.6.14 #305

Workflow file for this run

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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build
env:
COMPOSIO_BASE_URL: https://backend.composio.dev/api
COMPOSIO_API_KEY: ${{secrets.COMPOSIO_API_KEY_RELEASE}}
run: |
# 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
if: github.event_name == 'release'
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:
name: Create Plugin Releases
defaults:
run:
working-directory: ./python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build plugins
run: |
pip install build twine
plugins="autogen camel claude crew_ai griptape julep langchain llamaindex lyzr openai praisonai langgraph phidata google"
mkdir plugins_dist
for plugin in $plugins; do
cd plugins/$plugin
python -m build
mv dist/* ../../plugins_dist/
cd ../..
done
- name: Publish plugins to PyPI
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
skip-existing: true
packages-dir: python/plugins_dist/
publish-swe:
name: Create SWE Toolkit Release
defaults:
run:
working-directory: ./python/swe
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build
run: |
pip install build twine
python -m build
- name: Publish SWE Kit to PyPI
if: github.event_name == 'release'
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
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
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' && github.event_name == 'release'
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' && github.event_name == 'release'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-linux-amd64.zip
# Mac Intel Release
- if: matrix.os == 'macos-13' && github.event_name == 'release'
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-13' && github.event_name == 'release'
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' && github.event_name == 'release'
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' && github.event_name == 'release'
name: Upload artifact
uses: softprops/action-gh-release@v2
with:
files: python/dist/composio-darwin-arm64.zip
# # Windows release
# - if: matrix.os == 'windows-latest' && github.event_name == 'release'
# 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' && github.event_name == 'release'
# 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@v4
- 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@v5
with:
python-version: "3.10"
- name: Publishing tool server images
if: github.event_name == 'release'
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@v4
- uses: actions/setup-node@v4
- name: Install E2B
run: |
npm install -g @e2b/cli@latest
- name: Publishing Template
if: github.event_name == 'release'
env:
E2B_ACCESS_TOKEN: ${{secrets.E2B_ACCESS_TOKEN}}
run: |
cd python/dockerfiles/
make e2b