build(deps): bump actions/checkout from 4 to 5 #225
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: | |
| - mpy-cross-v6.3 | |
| tags: | |
| - mpy-cross-v6.3/* | |
| pull_request: | |
| branches: | |
| - mpy-cross-v6.3 | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_ARCHS_MACOS: x86_64 arm64 | |
| CIBW_ARCHS_LINUX: auto | |
| CIBW_ARCHS_WINDOWS: auto | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact-source | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for trusted publishing | |
| id-token: write | |
| # upload to PyPI on every tag | |
| if: github.event_name == 'push' && github.ref_type == 'tag' | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| pattern: artifact-* | |
| merge-multiple: true | |
| path: dist | |
| - uses: pypa/[email protected] |