Add link for Release Notes #229
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
| # Ref: https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml | |
| name: Build and upload to PyPI | |
| # Build on every branch push, tag push, and pull request change: | |
| on: [push, pull_request, workflow_dispatch] | |
| # Alternatively, to publish when a (published) GitHub Release is created, use the following: | |
| # on: | |
| # push: | |
| # pull_request: | |
| # release: | |
| # types: | |
| # - published | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # macos-13 is an intel runner, macos-14 is apple silicon | |
| os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| # Skip builds(save time / avoid build error) | |
| CIBW_SKIP: "*-musllinux_* *-win32" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: true | |
| - name: Build SDist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| # upload to PyPI on every tag starting with 'v' | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| # alternatively, to publish when a GitHub Release is created, use the following rule: | |
| # if: github.event_name == 'release' && github.event.action == 'published' | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/soxr | |
| permissions: | |
| contents: write | |
| id-token: write # IMPORTANT: mandatory for trusted publishing | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| # unpacks all CIBW artifacts into dist/ | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| dist/*.tar.gz | |
| dist/*.whl | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| # with: | |
| # repository_url: https://test.pypi.org/legacy/ # To test |