ci: simplify release, cibuildwheel not needed anymore

This commit is contained in:
Enno Hermann 2024-11-07 10:34:12 +01:00
parent d30eba573e
commit 683ee664a8
1 changed files with 19 additions and 29 deletions

View File

@ -7,8 +7,7 @@ defaults:
shell: shell:
bash bash
jobs: jobs:
build-sdist: build:
name: Build source distribution
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -20,37 +19,29 @@ jobs:
if [[ "v$version" != "$tag" ]]; then if [[ "v$version" != "$tag" ]]; then
exit 1 exit 1
fi fi
- uses: actions/setup-python@v5 - name: Install uv
uses: astral-sh/setup-uv@v3
with: with:
python-version: 3.9 version: "0.4.27"
- run: | enable-cache: true
python -m pip install -U pip setuptools build cache-dependency-glob: "**/pyproject.toml"
- run: | - name: Set up Python
python -m build run: uv python install 3.12
- run: | - name: Build sdist and wheel
pip install dist/*.tar.gz 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 - uses: actions/upload-artifact@v4
with: with:
name: build-sdist name: build
path: dist/*.tar.gz path: dist/*
build-wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.21.1
- uses: actions/upload-artifact@v4
with:
name: build-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
publish-artifacts: publish-artifacts:
name: Publish to PyPI name: Publish to PyPI
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [build-sdist, build-wheels] needs: [build]
environment: environment:
name: release name: release
url: https://pypi.org/p/coqui-tts url: https://pypi.org/p/coqui-tts
@ -60,8 +51,7 @@ jobs:
- uses: actions/download-artifact@v4 - uses: actions/download-artifact@v4
with: with:
path: dist path: dist
pattern: build-* pattern: build
merge-multiple: true
- run: | - run: |
ls -lh dist/ ls -lh dist/
- name: Publish package distributions to PyPI - name: Publish package distributions to PyPI