sem-tool 0.2.0

A simple Semantic Versioning CLI tool for parsing, filtering, sorting and explaining
Documentation
on: [push, pull_request]

name: "Code Hygiene Suite"

env:
    CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse

jobs:
  hygiene:
    strategy:
      matrix:
        platform: [macos-latest, ubuntu-latest, windows-latest]

    runs-on: ${{ matrix.platform }}

    steps:
    - uses: actions/checkout@v7
      with:
        submodules: true

    # - name: Install dependencies (Ubuntu only)
    #   if: matrix.platform == 'ubuntu-latest'
    #   run: |
    #       sudo apt-get update
    #       sudo apt-get install -y libdbus-1-dev pkg-config

    - name: rust toolchain
      uses: dtolnay/rust-toolchain@stable

    - name: Initialize Rust Cache
      uses: actions/cache@v6
      with:
        path: |
          ~/target
        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

    - name: cargo check
      run: cargo check

    - name: cargo fmt
      run: cargo fmt --all -- --check

    - name: cargo clippy
      run: cargo clippy --all-targets -- -D warnings

  dist-config:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v7
      with:
        submodules: true

    - name: rust toolchain
      uses: dtolnay/rust-toolchain@stable

    - name: Install cargo-dist
      shell: bash
      run: |
        version=$(sed -n 's/^cargo-dist-version = "\(.*\)"/\1/p' dist-workspace.toml)
        curl --proto '=https' --tlsv1.2 -LsSf \
          "https://github.com/axodotdev/cargo-dist/releases/download/v${version}/cargo-dist-installer.sh" | sh

    - name: Validate dist workspace config
      run: |
        dist plan
        dist generate --mode msi --check
        dist generate --mode ci --check --allow-dirty

  rumdl:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v7
      with:
        submodules: true

    # https://rumdl.dev/usage/ci-cd/ — @v0 tracks the latest v0.x release.

    - uses: rvben/rumdl@v0
      with:
        config: .rumdl.toml