Skip to content

ci: add the release pipeline #2

ci: add the release pipeline

ci: add the release pipeline #2

Workflow file for this run

name: Rust Publish
on:
release:
types:
- released
pull_request:
paths:
- .github/workflows/rust-publish.yml
workflow_dispatch:
inputs:
mode:
description: "dry_run: build & test only, release: build & publish to crates.io"
required: true
default: dry_run
type: choice
options:
- dry_run
- release
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C debuginfo=1"
RUST_BACKTRACE: "1"
CARGO_INCREMENTAL: "0"
CARGO_BUILD_JOBS: "1"
jobs:
publish:
runs-on: ubuntu-24.04
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y protobuf-compiler libssl-dev
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
with:
workspaces: rust
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
args: "--all-features"
path: rust/lance-graph
dry-run: ${{ github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.event.inputs.mode == 'dry_run') }}