zipher 0.3.0

Cryptography utilities and implementations including Argon2, bcrypt, post-quantum algorithms and JWT support
Documentation
name: Publish

on:
  push:
    branches:
      - main
      - master

permissions:
  contents: write

jobs:
  build_and_publish:
    name: Build, Check and Publish
    runs-on: ubuntu-latest
    environment: crates-io

    steps:
      - name: Checkout repository
        uses: actions/checkout@v5

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

      - name: Ensure rustup components
        run: |
          rustup component add clippy || true
          rustup component add rustfmt || true

      - name: Install tools
        run: |
          cargo install cargo-deny --force
          cargo install cargo-nextest --force
          cargo install cargo-audit --force

      - name: Check formatting
        run: cargo fmt -- --check

      - name: Clippy (treat warnings as errors)
        run: cargo clippy --all-targets -- -D warnings

      - name: Run tests (all features)
        run: cargo nextest run --all-features

      - name: Run cargo-deny (strict)
        run: cargo deny check --config deny.toml

      - name: Run cargo-audit (fatal here)
        run: cargo audit

      - name: Validate package (dry-run)
        run: cargo publish --dry-run

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