docs: update README with installation instructions and API reference #38
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 publish wheels | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| - name: Build sdist | |
| run: uv build --sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.name }} | |
| runs-on: ${{ matrix.runs_on }} | |
| needs: [build_sdist] | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| include: | |
| - name: windows-latest | |
| runs_on: windows-latest | |
| artifact_name: windows | |
| cibw_archs_windows: "AMD64 x86" | |
| cibw_skip: "" | |
| setup_qemu: false | |
| - name: windows-11-arm | |
| runs_on: windows-11-arm | |
| artifact_name: windows-arm64 | |
| cibw_archs_windows: "ARM64" | |
| cibw_skip: "" | |
| setup_qemu: false | |
| - name: macos-latest | |
| runs_on: macos-latest | |
| artifact_name: macos-latest | |
| cibw_archs_windows: "" | |
| cibw_skip: "" | |
| setup_qemu: false | |
| - name: ubuntu-latest | |
| runs_on: ubuntu-latest | |
| artifact_name: manylinux | |
| cibw_archs_windows: "" | |
| cibw_skip: "*-musllinux*" | |
| setup_qemu: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: Set up QEMU | |
| if: ${{ matrix.setup_qemu }} | |
| uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: all | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4.0 | |
| env: | |
| CIBW_TEST_SKIP: "*" | |
| CIBW_ARCHS_WINDOWS: ${{ matrix.cibw_archs_windows }} | |
| CIBW_SKIP: ${{ matrix.cibw_skip }} | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ./wheelhouse/*.whl | |
| retention-days: 1 | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| needs: [build_sdist, build_wheels] | |
| if: ${{ success() && startsWith(github.ref, 'refs/tags/v') }} | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true |