fastcsv 0.2.2

A fast SIMD parser for CSV files as defined by RFC 4180, based on simdcsv (C++)
Documentation
name: Publish to crates.io

on:
  release:
    types: [published]
  # Allow manual trigger for testing
  workflow_dispatch:
    inputs:
      dry_run:
        description: 'Run in dry-run mode (do not actually publish)'
        required: true
        default: 'true'
        type: choice
        options:
          - 'true'
          - 'false'

env:
  CARGO_TERM_COLOR: always

permissions:
  contents: read

jobs:
  publish:
    name: Publish crate
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
      
      - name: Cache cargo registry
        uses: actions/cache@v4
        with:
          path: ~/.cargo/registry
          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
      
      - name: Cache cargo index
        uses: actions/cache@v4
        with:
          path: ~/.cargo/git
          key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
      
      - name: Run tests
        run: cargo test --verbose
      
      - name: Package crate
        run: cargo package --verbose
      
      - name: Publish crate (dry-run)
        if: github.event_name == 'workflow_dispatch' && inputs.dry_run == 'true'
        run: cargo publish --dry-run
      
      - name: Publish crate (live)
        if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.dry_run == 'false')
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
        run: cargo publish --token ${CARGO_REGISTRY_TOKEN}