cargo update and bump version to v0.10.0 #413
This file contains 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: CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
- ci/* | |
tags: | |
- 'v0.[0-9]+.[0-9]+' | |
- 'v0.[0-9]+.[0-9]+-beta.[0-9]+' | |
- 'v0.[0-9]+.[0-9]+-alpha.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
# emit backtraces on panics. | |
RUST_BACKTRACE: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
components: rustfmt, clippy | |
- uses: swatinem/rust-cache@v2.7.3 | |
- name: rust fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Build release | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --verbose --all --release | |
- name: Run test | |
run: cargo test | |
publish_crate: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
profile: minimal | |
override: true | |
- name: Login to crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: login | |
args: ${{ secrets.CRATES_TOKEN }} | |
- name: Publish mq to crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: -p mq | |
- name: Publish mq-surreal to crates.io | |
uses: actions-rs/cargo@v1 | |
with: | |
command: publish | |
args: -p mq-surreal |