feat: add trusted orgs and flag #162
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
| # This file is autogenerated by maturin v1.13.1 | |
| # To update, run | |
| # | |
| # maturin generate-ci github -m kernels-data/bindings/python/Cargo.toml -o .github/workflows/kernels_data_python_release.yaml | |
| # | |
| # Post-generation edits: | |
| # - manifest paths made relative | |
| # - publish step switched from `uv publish` + API token to | |
| # `PyO3/maturin-action` + PyPI trusted publishing (see plan.md §3a, §3b) | |
| # - pull_request trigger gained `paths-ignore` for docs-only PRs | |
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: | |
| - "*" | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: ubuntu-22.04 | |
| target: x86_64 | |
| - runner: ubuntu-22.04 | |
| target: x86 | |
| - runner: ubuntu-22.04 | |
| target: aarch64 | |
| - runner: ubuntu-22.04 | |
| target: armv7 | |
| - runner: ubuntu-22.04 | |
| target: s390x | |
| - runner: ubuntu-22.04 | |
| target: ppc64le | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.8 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: auto | |
| - name: Build free-threaded wheels (3.13t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.13t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: auto | |
| - name: Build free-threaded wheels (3.14t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.14t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: auto | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-linux-${{ matrix.platform.target }} | |
| path: dist | |
| musllinux: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: ubuntu-22.04 | |
| target: x86_64 | |
| - runner: ubuntu-22.04 | |
| target: x86 | |
| - runner: ubuntu-22.04 | |
| target: aarch64 | |
| - runner: ubuntu-22.04 | |
| target: armv7 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.8 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: musllinux_1_2 | |
| - name: Build free-threaded wheels (3.13t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.13t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: musllinux_1_2 | |
| - name: Build free-threaded wheels (3.14t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.14t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| manylinux: musllinux_1_2 | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-musllinux-${{ matrix.platform.target }} | |
| path: dist | |
| windows: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: windows-latest | |
| target: x64 | |
| python_arch: x64 | |
| - runner: windows-latest | |
| target: x86 | |
| python_arch: x86 | |
| - runner: windows-11-arm | |
| target: aarch64 | |
| python_arch: arm64 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.13 | |
| architecture: ${{ matrix.platform.python_arch }} | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| if: matrix.platform.target != 'aarch64' | |
| with: | |
| python-version: 3.13t | |
| architecture: ${{ matrix.platform.python_arch }} | |
| - name: Build free-threaded wheels (3.13t) | |
| if: matrix.platform.target != 'aarch64' | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.13t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| if: matrix.platform.target != 'aarch64' | |
| with: | |
| python-version: 3.14t | |
| architecture: ${{ matrix.platform.python_arch }} | |
| - name: Build free-threaded wheels (3.14t) | |
| if: matrix.platform.target != 'aarch64' | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.14t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-windows-${{ matrix.platform.target }} | |
| path: dist | |
| macos: | |
| runs-on: ${{ matrix.platform.runner }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - runner: macos-15-intel | |
| target: x86_64 | |
| - runner: macos-latest | |
| target: aarch64 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.8 | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.13t | |
| - name: Build free-threaded wheels (3.13t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.13t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: 3.14t | |
| - name: Build free-threaded wheels (3.14t) | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| args: --release --out dist --manifest-path kernels-data/bindings/python/Cargo.toml -i python3.14t | |
| sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-macos-${{ matrix.platform.target }} | |
| path: dist | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| command: sdist | |
| args: --out dist --manifest-path kernels-data/bindings/python/Cargo.toml | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} | |
| needs: [linux, musllinux, windows, macos, sdist] | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/kernels-data | |
| permissions: | |
| # Use to sign the release artifacts | |
| id-token: write | |
| # Used to upload release artifacts | |
| contents: write | |
| # Used to generate artifact attestation | |
| attestations: write | |
| steps: | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0 | |
| with: | |
| subject-path: "wheels-*/*" | |
| - name: Publish to PyPI | |
| if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
| uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0 | |
| with: | |
| command: upload | |
| args: --non-interactive --skip-existing wheels-*/* |