diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml index 822990e967..4122f69f73 100644 --- a/.github/workflows/pypi-release.yml +++ b/.github/workflows/pypi-release.yml @@ -7,8 +7,7 @@ defaults: shell: bash jobs: - build-sdist: - name: Build source distribution + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,37 +19,29 @@ jobs: if [[ "v$version" != "$tag" ]]; then exit 1 fi - - uses: actions/setup-python@v5 + - name: Install uv + uses: astral-sh/setup-uv@v3 with: - python-version: 3.9 - - run: | - python -m pip install -U pip setuptools build - - run: | - python -m build - - run: | - pip install dist/*.tar.gz - - uses: actions/upload-artifact@v4 - with: - name: build-sdist - path: dist/*.tar.gz - 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 + version: "0.4.27" + 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-wheels-${{ matrix.os }} - path: ./wheelhouse/*.whl + name: build + path: dist/* publish-artifacts: name: Publish to PyPI runs-on: ubuntu-latest - needs: [build-sdist, build-wheels] + needs: [build] environment: name: release url: https://pypi.org/p/coqui-tts @@ -60,8 +51,7 @@ jobs: - uses: actions/download-artifact@v4 with: path: dist - pattern: build-* - merge-multiple: true + pattern: build - run: | ls -lh dist/ - name: Publish package distributions to PyPI