chore: ci publish and pin versions

This commit is contained in:
Greyson LaLonde
2025-09-28 00:59:25 -04:00
committed by GitHub
parent 68dce92003
commit 417a4e3d91
3 changed files with 70 additions and 2 deletions

68
.github/workflows/publish.yml vendored Normal file
View File

@@ -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

View File

@@ -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",

View File

@@ -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"