Skip to content

Add Python 3.13 support #8

Add Python 3.13 support

Add Python 3.13 support #8

Workflow file for this run

name: Publish Python 🐍 distributions 📦 to PyPI
on:
release:
types: [published]
pull_request:
types: [opened, synchronize, reopened]
defaults:
run:
shell:
bash
jobs:
build-sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Verify tag matches version
# run: |
# set -ex
# version=$(grep -m 1 version pyproject.toml | grep -P '\d+\.\d+\.\d+' -o)
# tag="${GITHUB_REF/refs\/tags\/}"
# if [[ "v$version" != "$tag" ]]; then
# exit 1
# fi
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.21"
enable-cache: true
cache-dependency-glob: "**/pyproject.toml"
- name: Set up Python
run: uv python install 3.9
- run: uv build --sdist
- run: uv pip install dist/*.tar.gz
- uses: actions/upload-artifact@v4
with:
name: build-sdist
path: dist/*.tar.gz
build-wheels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.3
- uses: actions/upload-artifact@v4
with:
name: build-wheel
path: ./wheelhouse/*.whl
publish-artifacts:
runs-on: ubuntu-latest
needs: [build-sdist, build-wheels]
# environment:
# name: release
# url: https://pypi.org/p/coqui-tts-trainer
# permissions:
# id-token: write
steps:
- uses: actions/download-artifact@v4
with:
path: "dist/"
pattern: build-*
merge-multiple: true
- run: |
ls -lh dist/
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1