dedups 0.1.0

A fast and efficient file deduplication tool with support for media files
Documentation
name: Publish to crates.io

on:
  push:
    tags:
      - 'v*'

env:
  CARGO_TERM_COLOR: always

jobs:
  publish:
    name: Publish
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy

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

      - name: Check formatting
        run: cargo fmt -- --check
        env:
          RUSTFLAGS: "-C target-cpu=native"

      - name: Clippy
        run: cargo clippy -- -D warnings
        env:
          RUSTFLAGS: "-C target-cpu=native"

      - name: Run tests
        run: cargo test --all-features
        env:
          RUSTFLAGS: "-C target-cpu=native"

      - name: Publish to crates.io
        run: cargo publish --token ${CRATES_TOKEN}
        env:
          CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}