certmonitor 0.2.0

TUI that connects to a list of host:port targets over TLS and ranks them by days until their certificate expires, like `top` for certificate expiry.
name: Main

on:
  push:

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Format check
        run: cargo fmt --check
      - name: Run tests with coverage
        run: >
          cargo install cargo-tarpaulin
          && cargo tarpaulin
          --verbose
          --out Xml
          --engine llvm
          --skip-clean
      - name: Upload coverage reports to Codecov
        uses: codecov/codecov-action@v3
      - run: cargo clippy --all-targets --verbose -- -D warnings
      - name: Install cargo-audit
        run: cargo install cargo-audit --locked
      - name: Audit dependencies
        run: cargo audit

  release-please:
    name: Execute release chores
    permissions:
      contents: write
      pull-requests: write
    runs-on: ubuntu-latest
    needs: test
    outputs:
      created: ${{ steps.release.outputs.release_created }}
    steps:
      - uses: google-github-actions/release-please-action@v3
        id: release
        with:
          release-type: rust
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  publish:
    name: Publish to crates.io
    runs-on: ubuntu-latest
    needs: release-please
    if: needs.release-please.outputs.created
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Publish
        run: >
          cargo publish
          --verbose
          --locked
          --token ${{ secrets.CARGO_REGISTRY_TOKEN }}