chore: release v1.5.2 #1253
Workflow file for this run
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: Rust | |
permissions: | |
pull-requests: write | |
contents: write | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUSTFLAGS: '-D warnings' | |
CARGO_INCREMENTAL: 0 | |
RUST_BACKTRACE: short | |
jobs: | |
tests: | |
strategy: | |
matrix: | |
rust_version: [1.67.0, stable] | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust_version }} | |
- name: set default rust toolchain | |
run: rustup default ${{ matrix.rust_version }} | |
- name: print rustc version | |
run: rustc --version | |
# - name: downgrade `toml_edit`, time`, `toml_datetime` crate to support older Rust toolchain | |
# if: matrix.rust_version == '1.67.0' | |
# run: | | |
# cargo update -p toml_edit --precise 0.21.0 | |
- name: Run tests | |
run: ./.github/test.sh | |
# remove this job when https://github.com/rust-lang/rust/issues/89554 stabilizes | |
test_exhaustive_checks: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install nightly for exhaustive check tests | |
uses: dtolnay/rust-toolchain@nightly | |
# a failure on this check means, that some of `syn` crate's enums have been extended | |
# with new variants. | |
# consult https://github.com/serde-rs/serde/blob/master/serde_derive/src/bound.rs#L100 , | |
# the implementation of `FindTyParams` may have been updated already | |
- name: Run exhaustive check tests | |
run: RUSTFLAGS="-A unused_imports -D warnings" cargo check --workspace --features force_exhaustive_checks | |
clippy: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run clippy | |
run: cargo clippy --features unstable__schema --benches -- -D clippy::all | |
cargo-fmt: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run cargo fmt | |
run: cargo fmt --check | |
# there're sometimes warnings, which signal, that the generated doc | |
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being | |
# generated at release time altogether. | |
cargo-doc: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: run cargo doc | |
run: RUSTDOCFLAGS="-D warnings" cargo doc --features derive,unstable__schema | |
release-plz: | |
runs-on: ubuntu-latest | |
needs: [tests, clippy, cargo-fmt] | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run release-plz | |
uses: MarcoIeni/release-plz-action@v0.5 | |
env: | |
# https://marcoieni.github.io/release-plz/github-action.html#triggering-further-workflow-runs | |
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |