From 417a4e3d917d445424b8993af92b4e0f9770656c Mon Sep 17 00:00:00 2001 From: Greyson LaLonde Date: Sun, 28 Sep 2025 00:59:25 -0400 Subject: [PATCH] chore: ci publish and pin versions --- .github/workflows/publish.yml | 68 +++++++++++++++++++++++++++++++++ lib/crewai-tools/pyproject.toml | 2 +- lib/crewai/pyproject.toml | 2 +- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..b79a6b70f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,68 @@ +name: Publish to PyPI + +on: + release: + types: [ published ] + workflow_dispatch: + +jobs: + build: + if: github.event.release.prerelease == true + name: Build packages + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: Build packages + run: | + uv build --all-packages + rm dist/.gitignore + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + if: github.event.release.prerelease == true + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/crewai + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: "0.8.4" + python-version: "3.12" + enable-cache: false + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist + + - name: Publish to PyPI + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + run: | + for package in dist/*; do + echo "Publishing $package" + uv publish "$package" + done diff --git a/lib/crewai-tools/pyproject.toml b/lib/crewai-tools/pyproject.toml index f80707867..d5edc894c 100644 --- a/lib/crewai-tools/pyproject.toml +++ b/lib/crewai-tools/pyproject.toml @@ -12,7 +12,7 @@ dependencies = [ "pytube>=15.0.0", "requests>=2.32.0", "docker>=7.1.0", - "crewai", + "crewai==1.0.0a0", "lancedb>=0.5.4", "tiktoken>=0.8.0", "stagehand>=0.4.1", diff --git a/lib/crewai/pyproject.toml b/lib/crewai/pyproject.toml index 1d865db8a..aeeb5d7a9 100644 --- a/lib/crewai/pyproject.toml +++ b/lib/crewai/pyproject.toml @@ -50,7 +50,7 @@ Repository = "https://github.com/crewAIInc/crewAI" [project.optional-dependencies] tools = [ - "crewai-tools>=0.74.0", + "crewai-tools==1.0.0a0", ] embeddings = [ "tiktoken~=0.8.0"