parsm 0.2.0

Multi-format data processor that understands structured text better than sed or awk. Supports JSON, CSV, YAML, TOML, logfmt, and plain text with powerful filtering and templating.
Documentation
name: Deploy to crates.io
on:
  push:
    tags:
      - '*'
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          override: true
          components: rustfmt, clippy
      - name: Cache cargo registry
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-
      - name: Format check
        run: cargo fmt --all -- --check
      - name: Clippy check
        run: cargo clippy --all-targets --all-features -- -D warnings
      - name: Run tests
        run: cargo test --all
      - name: Build release
        run: cargo build --release
      - name: Publish to crates.io
        run: cargo publish --token ${{ secrets.CRATES_IO }}
        env:
          CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO }}
      - name: Generate documentation
        run: cargo doc --no-deps --all-features
      - name: GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          draft: false
          prerelease: false
          tag_name: ${{ github.ref_name }}
          name: Release v${{ github.ref_name }}
          body: |
            ## What's Changed

            See [CHANGELOG.md](CHANGELOG.md) for detailed changes.

            ## Installation

            ```bash
            cargo install parsm --version ${{ github.ref_name }}
            ```

            Or download the binaries from the assets below.
          generate_release_notes: true
          make_latest: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  build-binaries:
    runs-on: ${{ matrix.os }}
    needs: deploy
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            artifact-name: parsm-linux-x86_64
          - os: windows-latest
            target: x86_64-pc-windows-msvc
            artifact-name: parsm-windows-x86_64.exe
          - os: macos-latest
            target: x86_64-apple-darwin
            artifact-name: parsm-macos-x86_64
          - os: macos-latest
            target: aarch64-apple-darwin
            artifact-name: parsm-macos-aarch64
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
      - name: Setup Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
          target: ${{ matrix.target }}
          override: true
      - name: Build release binary
        run: cargo build --release --target ${{ matrix.target }}
      - name: Prepare binary (Unix)
        if: matrix.os != 'windows-latest'
        run: |
          cp target/${{ matrix.target }}/release/parsm ${{ matrix.artifact-name }}
          strip ${{ matrix.artifact-name }}
      - name: Prepare binary (Windows)
        if: matrix.os == 'windows-latest'
        run: |
          cp target/${{ matrix.target }}/release/parsm.exe ${{ matrix.artifact-name }}
      - name: Upload release assets
        uses: softprops/action-gh-release@v2
        with:
          files: ${{ matrix.artifact-name }}
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}