99 type : string
1010
1111jobs :
12- build-and-publish :
12+ build :
13+ name : ' Build and upload wheels'
1314 runs-on : ubuntu-latest
14- environment :
15- name : pypi
16- url : https://pypi.org/p/pipecat-ai-flows
17- permissions :
18- id-token : write # IMPORTANT: this permission is needed for trusted publishing
19- contents : write # Needed for tagging
20-
2115 steps :
2216 - name : Checkout code
2317 uses : actions/checkout@v4
18+ with :
19+ fetch-tags : true
20+ fetch-depth : 100
2421
2522 - name : Install uv
2623 uses : astral-sh/setup-uv@v3
@@ -32,19 +29,17 @@ jobs:
3229
3330 - name : Verify version matches
3431 run : |
35- PROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
32+ PROJECT_VERSION=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
3633 if [ "$PROJECT_VERSION" != "${{ github.event.inputs.version }}" ]; then
3734 echo "Error: Input version (${{ github.event.inputs.version }}) does not match pyproject.toml version ($PROJECT_VERSION)"
3835 exit 1
3936 fi
4037
41- - name : Install dependencies
42- run : |
43- uv sync
44- uv pip install build twine
38+ - name : Install development dependencies
39+ run : uv sync --group dev
4540
46- - name : Build package
47- run : python -m build
41+ - name : Build project
42+ run : uv build
4843
4944 - name : Create release tag
5045 run : |
5348 git tag -a "v${{ github.event.inputs.version }}" -m "Version ${{ github.event.inputs.version }}"
5449 git push origin "v${{ github.event.inputs.version }}"
5550
51+ - name : Upload wheels
52+ uses : actions/upload-artifact@v4
53+ with :
54+ name : wheels
55+ path : ./dist
56+
57+ publish-to-pypi :
58+ name : ' Publish to PyPI'
59+ runs-on : ubuntu-latest
60+ needs : [build]
61+ environment :
62+ name : pypi
63+ url : https://pypi.org/p/pipecat-ai-flows
64+ permissions :
65+ id-token : write
66+ contents : write # Needed for tagging
67+ steps :
68+ - name : Download wheels
69+ uses : actions/download-artifact@v4
70+ with :
71+ name : wheels
72+ path : ./dist
73+
5674 - name : Publish to PyPI
5775 uses : pypa/gh-action-pypi-publish@release/v1
5876 with :
0 commit comments