lance-nd 0.1.0

N-dimensional datasets stored in Lance, one dataset or chunk per row
Documentation
name: Publish to crates.io

on:
  release:
    types: [published]
  workflow_dispatch:

permissions:
  contents: read

env:
  PROTOC_VERSION: "29.3"

jobs:
  ci:
    uses: ./.github/workflows/ci.yml

  semver:
    needs: ci
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v7
      - uses: taiki-e/install-action@v2
        with:
          tool: protoc@3.${{ env.PROTOC_VERSION }}
      - id: published
        run: |
          if curl -sf -A "lance-nd release workflow" https://crates.io/api/v1/crates/lance-nd > /dev/null; then
            echo "found=true" >> "$GITHUB_OUTPUT"
          else
            echo "found=false" >> "$GITHUB_OUTPUT"
          fi
      # The first release has no published version to compare with.
      - if: steps.published.outputs.found == 'true'
        uses: obi1kenobi/cargo-semver-checks-action@v2
        with:
          package: lance-nd

  publish:
    needs: [ci, semver]
    runs-on: ubuntu-24.04
    environment: crates-io
    steps:
      - uses: actions/checkout@v7
      # Lance needs protoc to build.
      - uses: taiki-e/install-action@v2
        with:
          tool: protoc@3.${{ env.PROTOC_VERSION }}
      - uses: dtolnay/rust-toolchain@stable
      - run: cargo publish -p lance-nd
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}