name: Release Readiness
on:
workflow_dispatch:
inputs:
version:
description: Expected crate version from Cargo.toml
required: true
type: string
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
release-readiness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- uses: taiki-e/install-action@v2
with:
tool: cargo-public-api
- name: Install nightly for docs.rs check
run: rustup toolchain install nightly --profile minimal
- name: Verify release metadata
env:
RELEASE_VERSION: ${{ inputs.version }}
run: bash ./scripts/check-release.sh
- name: Format
run: cargo fmt --all -- --check
- name: Generated Endpoint Catalog
run: python3 ./scripts/generate_endpoints.py --check
- name: Cargo Deny
run: cargo deny check
- name: Public API
run: bash ./scripts/check-public-api.sh
- name: No Default Features
run: cargo test --no-default-features
- name: All Features
run: cargo test --all-features
- name: Examples
run: cargo check --examples --all-features
- name: Ecosystem Fixtures
run: bash ./scripts/check-ecosystem.sh
- name: Downstream Canaries
run: bash ./scripts/check-downstream-canaries.sh
- name: Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Cargo publish dry run
run: cargo publish --dry-run --all-features
- name: Docs.rs-style docs build
env:
RUSTDOCFLAGS: --cfg docsrs
run: cargo +nightly doc --all-features --no-deps