ci: add the release pipeline #5
Workflow file for this run
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: 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 | |
| cache: false | |
| - uses: rui314/setup-mold@v1 | |
| - 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') }} |