feat: add base_url beta and logout support #100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
echo "Updated version in setup.py (core)" | |
fi | |
python -m build | |
echo "Installing package locally" | |
pip install -e . | |
cd .. | |
- name: Publish package (Core) | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
cd core && twine upload dist/* && cd ../ | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
- name: Build langchain package and install locally | |
run: | | |
cd langchain | |
pip install -e . | |
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 | |
echo "Updated version in pyproject.toml and requirements.txt" | |
fi | |
python -m build | |
echo "Installing package locally" | |
cd .. | |
- name: Publish package (Langchain) | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
cd langchain && twine upload dist/* && cd ../ | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
- name: Build crew package and install locally | |
run: | | |
cd crew_ai | |
echo "Installing package locally" | |
pip install -e . | |
if [[ $GITHUB_REF == refs/tags/v* ]]; then | |
sed -i "s/version = '.*'/version = '${{ env.PACKAGE_VERSION }}'/" setup.py | |
sed -i "s/composio_langchain===.*/composio_langchain===${{ env.PACKAGE_VERSION }}\",/" pyproject.toml | |
sed -i "s/composio_langchain===.*/composio_langchain===${{ env.PACKAGE_VERSION }}/" requirements.txt | |
echo "Updated version in pyproject.toml and requirements.txt" | |
fi | |
python -m build | |
cd .. | |
- name: Publish package (Crew AI) | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
cd crew_ai && twine upload dist/* && cd ../ | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |