Add Python 3.13 support #11
This file contains 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 Python 🐍 distributions 📦 to PyPI | |
on: | |
release: | |
types: [published] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
defaults: | |
run: | |
shell: | |
bash | |
jobs: | |
build: | |
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.12 | |
- name: Build sdist and wheel | |
run: uv build | |
- name: Test installation of sdist and wheel | |
run: | | |
uv venv --no-project | |
uv pip install dist/*.tar.gz | |
uv pip install dist/*.whl | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: dist/* | |
publish-artifacts: | |
runs-on: ubuntu-latest | |
needs: [build] | |
# environment: | |
# name: release | |
# url: https://pypi.org/p/coqui-tts-trainer | |
# permissions: | |
# id-token: write | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: "dist/" | |
name: build | |
- run: | | |
ls -lh dist/ | |
# - name: Publish package distributions to PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 |