This repository was archived by the owner on Jul 5, 2026. It is now read-only.
Publish to TestPyPI #18
This file contains hidden or 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: Publish to TestPyPI | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Version to publish (must match pyproject.toml, e.g. 0.0.4)' | |
| required: true | |
| type: string | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: testpypi | |
| url: https://test.pypi.org/p/pipecat-ai-flows | |
| permissions: | |
| id-token: write # IMPORTANT: this permission is needed for trusted publishing | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| with: | |
| version: 'latest' | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Verify version matches | |
| run: | | |
| PROJECT_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") | |
| if [ "$PROJECT_VERSION" != "${{ github.event.inputs.version }}" ]; then | |
| echo "Error: Input version (${{ github.event.inputs.version }}) does not match pyproject.toml version ($PROJECT_VERSION)" | |
| exit 1 | |
| fi | |
| - name: Install dependencies | |
| run: | | |
| uv sync | |
| uv pip install build twine | |
| - name: Build package | |
| run: python -m build | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| verbose: true | |
| print-hash: true |