Skip to content

fix: issue with sdk.utils #7

fix: issue with sdk.utils

fix: issue with sdk.utils #7

Workflow file for this run

name: Build and Release
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine build
pip install -r core/requirements.txt
pip install -r langchain/requirements.txt
pip install -r crew_ai/requirements.txt
- name: Extract version from tag
id: tag_version
run: |
echo "PACKAGE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
echo $PACKAGE_VERSION
- name: Build core package and install locally
run: |
cd core
if [[ $GITHUB_REF == refs/tags/v* ]]; then
sed -i "s/version=.*/version='${{ env.PACKAGE_VERSION }}',/" setup.py
fi
python setup.py sdist bdist_wheel
echo "Installing package locally"
pip install -e .
cd ..
- name: Build langchain package and install locally
run: |
cd langchain
if [[ $GITHUB_REF == refs/tags/v* ]]; then
sed -i "s/version=.*/version='${{ env.PACKAGE_VERSION }}',/" setup.py
sed -i "s/composio_core===.*/composio_core==='${{ env.PACKAGE_VERSION }}',/" pyproject.toml
sed -i "s/composio_core===.*/composio_core==='${{ env.PACKAGE_VERSION }}'/" requirements.txt
fi
python setup.py sdist bdist_wheel
echo "Installing package locally"
pip install -e .
cd ..
- name: Build crew package and install locally
run: |
cd crew_ai
if [[ $GITHUB_REF == refs/tags/v* ]]; then
sed -i "s/version=.*/version='${{ env.PACKAGE_VERSION }}',/" setup.py
fi
python setup.py sdist bdist_wheel
echo "Installing package locally"
pip install -e .
cd ..
- name: Publish package
if: startsWith(github.ref, 'refs/tags/v')
run: |
twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}