name: Cargo Publish on: push: tags-ignore: # We don't publish pre-releases for Rust. Crates.io is just a source # distribution, so we don't need to publish pre-releases. - 'v*-beta*' - '*-v*' # for example, python-vX.Y.Z env: # This env var is used by Swatinem/rust-cache@v2 for the cache # key, so we set it to make sure it is always consistent. CARGO_TERM_COLOR: always # Up-to-date compilers needed for fp16kernels. CC: gcc-12 CXX: g++-12 jobs: build: runs-on: ubuntu-22.04 timeout-minutes: 30 # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') steps: - uses: actions/checkout@v4 - uses: Swatinem/rust-cache@v2 with: workspaces: rust - name: Install dependencies run: | sudo apt update sudo apt install -y protobuf-compiler libssl-dev - name: Publish the package run: | cargo publish -p lancedb --all-features --token ${{ secrets.CARGO_REGISTRY_TOKEN }}