#12513 Enable Python 3.14 wheel #180
Workflow file for this run
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: Build and upload to PyPI | |
| on: | |
| push: | |
| branches: | |
| - trunk | |
| # To simplify the release process, the publishing is triggered on tag. | |
| # We should make sure to only push tags for new releases. | |
| # If we start using tags for non-release purposes, | |
| # this needs to be updated. | |
| # | |
| # We need to explicitly configure an expression that matches anything. | |
| tags: [ "**" ] | |
| pull_request: | |
| jobs: | |
| check_manifest: | |
| name: Check MANIFEST.in | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| name: Install Python | |
| with: | |
| python-version: '3.13' | |
| - name: Install Check-manifest | |
| run: | | |
| python -m pip install check-manifest | |
| - name: Check manifest | |
| run: python -m check_manifest | |
| build_wheels: | |
| name: Build wheels on windows-latest | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| name: Install Python | |
| with: | |
| python-version: '3.13' | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install cibuildwheel==2.22.0 | |
| - name: Build wheels | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-wheels | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| name: Install Python | |
| with: | |
| python-version: '3.13' | |
| - name: Install build | |
| run: | | |
| python -m pip install build | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-sdist | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist, check_manifest] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for trusted publishing | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: artifact-* | |
| merge-multiple: true | |
| path: dist | |
| - name: Check files | |
| run: ls -al dist/ | |
| - name: Publish to PyPI - on tag | |
| # Skip upload to PyPI if we don't have a tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: pypa/gh-action-pypi-publish@release/v1 |