Skip to content

Commit

Permalink
fet: github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsh-dixit committed Mar 20, 2024
1 parent 1b906e3 commit 1e8636f
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,41 +35,63 @@ jobs:
- 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 .
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
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
python setup.py sdist bdist_wheel
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_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 setup.py sdist bdist_wheel
echo "Installing package locally"
pip install -e .
cd ..
- name: Publish package (Langchain)
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 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 .
if [[ $GITHUB_REF == refs/tags/v* ]]; then
sed -i "s/version=.*/version='${{ env.PACKAGE_VERSION }}',/" setup.py
sed -i "s/composio_core===.*/composio_langchain==='${{ env.PACKAGE_VERSION }}',/" pyproject.toml
sed -i "s/composio_core===.*/composio_langchain==='${{ env.PACKAGE_VERSION }}'/" requirements.txt
echo "Updated version in pyproject.toml and requirements.txt"
fi
cd ..
- name: Publish package
- name: Publish package (Crew AI)
if: startsWith(github.ref, 'refs/tags/v')
run: |
twine upload dist/*
cd core && twine upload dist/* && cd ../
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}

0 comments on commit 1e8636f

Please sign in to comment.