meowping 2.0.8

A flexible ping utility Tool written in Rust, that is focused on being size efficient and fast.
name: Automatic Release Build

on:
 release:
  types: [published]

permissions:
 contents: write

jobs:
 build:
  strategy:
   fail-fast: false
   matrix:
    include:
     - os: ubuntu-latest
       target: x86_64-unknown-linux-gnu
     - os: ubuntu-24.04-arm
       target: aarch64-unknown-linux-gnu
     - os: macos-latest
       target: aarch64-apple-darwin
     # macOS arm64 runner cross-links x86_64 via the Xcode toolchain.
     - os: macos-latest
       target: x86_64-apple-darwin
     - os: windows-latest
       target: x86_64-pc-windows-msvc
     # windows-gnu needs MinGW's windres.exe (build.rs resource compile).
     # MSYS2 is preinstalled on windows-latest but not on PATH, so the
     # job below prepends C:\msys64\mingw64\bin.
     - os: windows-latest
       target: x86_64-pc-windows-gnu

  runs-on: ${{ matrix.os }}
  steps:
   - uses: actions/checkout@v4
   - uses: dtolnay/rust-toolchain@nightly
     with:
      targets: ${{ matrix.target }}
      components: rust-src
   - if: matrix.target == 'x86_64-pc-windows-gnu'
     shell: bash
     run: |
      rustup toolchain install nightly-x86_64-pc-windows-gnu \
        --component rust-src --profile minimal
      rustup default nightly-x86_64-pc-windows-gnu
   - if: matrix.target == 'x86_64-pc-windows-gnu'
     shell: bash
     run: echo "C:\msys64\mingw64\bin" >> "$GITHUB_PATH"

   - name: Build binary and create archive
     shell: bash
     run: |
      cargo build --verbose --release --target ${{ matrix.target }}
      archive="meowping-${{ github.event.release.tag_name }}-${{ matrix.target }}"
      cd target/${{ matrix.target }}/release
      if [ "${{ matrix.os }}" = "windows-latest" ]; then
        asset="$archive.zip"
        7z a "../../../$asset" "meowping.exe"
      else
        asset="$archive.tar.gz"
        tar czf "../../../$asset" "meowping"
      fi
      cd ../../..
      echo "ASSET=$asset" >> "$GITHUB_ENV"

   - name: Upload archive
     env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      ASSET: ${{ env.ASSET }}
     shell: bash
     run: |
      gh release upload "${{ github.event.release.tag_name }}" ${{ env.ASSET }} --clobber