zebo 0.5.1

Write data on FS in a performance way
Documentation
name: Release

on:
  release:
    types: [published]

permissions:
  contents: write

env:
  CARGO_TERM_COLOR: always

jobs:
  build-binaries:
    name: Build zebo-inspect binary
    runs-on: ${{ matrix.os }}
    
    strategy:
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            binary_name: zebo-inspect
            asset_name: zebo-inspect-linux-x64
          - os: macos-latest
            target: x86_64-apple-darwin
            binary_name: zebo-inspect
            asset_name: zebo-inspect-macos-x64
          - os: macos-latest
            target: aarch64-apple-darwin
            binary_name: zebo-inspect
            asset_name: zebo-inspect-macos-arm64
          # Windows is not supported yet. Make a PR if interested.
          # - os: windows-latest
          #   target: x86_64-pc-windows-msvc
          #   binary_name: zebo-inspect.exe
          #   asset_name: zebo-inspect-windows-x64.exe

    steps:
    - name: Checkout code
      uses: actions/checkout@v4

    - name: Set up Rust
      uses: dtolnay/rust-toolchain@stable
      with:
        targets: ${{ matrix.target }}

    - name: Set up cargo cache
      uses: actions/cache@v3
      with:
        path: |
          ~/.cargo/bin/
          ~/.cargo/registry/index/
          ~/.cargo/registry/cache/
          ~/.cargo/git/db/
          target/
        key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
        restore-keys: |
          ${{ runner.os }}-cargo-${{ matrix.target }}-
          ${{ runner.os }}-cargo-

    - name: Build binary
      run: cargo build --release --bin zebo-inspect --target ${{ matrix.target }}

    - name: Rename binary
      shell: bash
      run: |
        if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
          cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} ${{ matrix.asset_name }}
        else
          cp target/${{ matrix.target }}/release/${{ matrix.binary_name }} ${{ matrix.asset_name }}
          chmod +x ${{ matrix.asset_name }}
        fi

    - name: Generate checksum
      shell: bash
      run: |
        if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
          certutil -hashfile ${{ matrix.asset_name }} SHA256 > ${{ matrix.asset_name }}.sha256
        elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then
          shasum -a 256 ${{ matrix.asset_name }} > ${{ matrix.asset_name }}.sha256
        else
          sha256sum ${{ matrix.asset_name }} > ${{ matrix.asset_name }}.sha256
        fi

    - name: Upload assets to release
      uses: softprops/action-gh-release@v1
      with:
        files: |
          ${{ matrix.asset_name }}
          ${{ matrix.asset_name }}.sha256