-
Notifications
You must be signed in to change notification settings - Fork 26
40 lines (38 loc) · 992 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 workspaces
run: |
cargo install cargo-quickinstall
cargo quickinstall cargo-workspaces
- name: Dry run release
if: github.event_name == 'pull_request'
run: |
cargo workspaces publish --all --dry-run --publish-as-is
- name: Release to crates.io
if: github.event_name == 'push'
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo workspaces publish --all --publish-as-is --yes