Skip to content

chore(ci): add dry run for cargo publish #65

chore(ci): add dry run for cargo publish

chore(ci): add dry run for cargo publish #65

Workflow file for this run

name: Publish
on:
push:
branches:
- main
paths:
- "Cargo.toml"
pull_request:
branches:
- main
paths:
- "Cargo.toml"
jobs:
crates:
runs-on: ubuntu-latest
environment:
name: crates.io
url: https://crates.io/crates/databend-driver
steps:
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with:
cache-key: publish
- name: Setup Cargo Release
run: |
rm -f .gitconfig
cargo install cargo-quickinstall
cargo quickinstall cargo-release
- name: Dry run release
if: github.event_name == 'pull_request'
run: |
cargo release publish --no-confirm --no-publish
- name: Release to crates.io
if: github.event_name == 'push'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo release publish --execute --no-confirm