opsview 0.1.12

A Rust Opsview API Client Library with batteries included
Documentation
---
on:
  push:
    tags:
      - '*'
  workflow_dispatch:

name: Publish Crate

jobs:
  test:
    name: Cargo Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - uses: Swatinem/rust-cache@v2
      - uses: taiki-e/install-action@cargo-deny
      - name: Scan for vulnerabilities
        run: cargo deny check advisories
      - name: Run cargo fmt
        run: cargo fmt --check
      - name: Run cargo clippy
        run: cargo clippy -- -D warnings
      - name: Run cargo test
        run: cargo test

  publish:
    needs:
      - test
    name: Publish Crate to crates.io
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install stable toolchain
        uses: dtolnay/rust-toolchain@stable
      - run: cargo publish --token ${CRATES_IO_TOKEN}
        env:
          CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
...