docs: small fixes (#400) #344
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: Release-plz | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| release-plz-release: | |
| name: Release-plz release | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'kantord' }} | |
| outputs: | |
| releases_created: ${{ steps.release.outputs.releases_created }} | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - &checkout | |
| name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Configure git identity for signed commits | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR_ID:-${GITHUB_ACTOR}@users.noreply.github.com}" | |
| - &install-rust | |
| name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable | |
| with: | |
| toolchain: stable | |
| - id: release | |
| name: Run release-plz | |
| uses: release-plz/action@487eb7b5c085a664d5c5ca05f4159bd9b591182a # v0.5 | |
| with: | |
| command: release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| release-plz-pr: | |
| name: Release-plz PR | |
| runs-on: ubuntu-latest | |
| needs: | |
| - release-plz-release | |
| if: ${{ github.repository_owner == 'kantord' }} | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: release-plz-${{ github.ref }} | |
| cancel-in-progress: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure git identity for signed commits | |
| run: | | |
| git config user.name "${GITHUB_ACTOR}" | |
| git config user.email "${GITHUB_ACTOR_ID:-${GITHUB_ACTOR}@users.noreply.github.com}" | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable | |
| with: | |
| toolchain: stable | |
| - name: Run release-plz | |
| id: release_pr | |
| uses: release-plz/action@487eb7b5c085a664d5c5ca05f4159bd9b591182a # v0.5 | |
| with: | |
| command: release-pr | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| python-wheels: | |
| name: Build and publish Python wheels | |
| needs: [release-plz-release] | |
| # Run after a new release, or allow manual dispatch to rebuild wheels (e.g., after CI fixes) | |
| if: ${{ github.event_name == 'workflow_dispatch' || needs.release-plz-release.outputs.releases_created == 'true' }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-22.04-arm, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561 # stable | |
| with: | |
| toolchain: stable | |
| - name: Verify workspace lockfile covers python crate | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| cargo metadata --locked --manifest-path python/Cargo.toml --format-version 1 >/dev/null | |
| - name: Build wheels | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1 | |
| with: | |
| command: build | |
| args: --release --locked -m python/Cargo.toml -i 3.10 3.11 3.12 3.13 3.14 | |
| manylinux: "2014" | |
| token: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| before-script-linux: yum install -y perl-core | |
| - name: Build sdist | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1 | |
| with: | |
| command: sdist | |
| token: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| # no --locked for sdist (not supported by maturin) | |
| - name: Publish to PyPI | |
| uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1 | |
| with: | |
| command: publish | |
| token: ${{ secrets.RELEASE_PLZ_TOKEN }} | |
| # Pin interpreters to avoid building against unsupported Python | |
| args: --skip-existing -i 3.10 3.11 3.12 3.13 3.14 | |
| trigger-binaries: | |
| name: Trigger Release Binaries | |
| needs: [release-plz-release] | |
| if: ${{ false }} # binaries are built on release published; no manual dispatch needed | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "release-binaries now runs on release published; no dispatch needed" |