oxidelta 0.1.4

VCDIFF (RFC 3284) delta encoder/decoder — Rust reimplementation of xdelta3
Documentation
name: release-matrix

on:
  workflow_dispatch:

permissions:
  contents: write

jobs:
  build:
    name: Build ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: ubuntu-latest
            target: x86_64-unknown-linux-gnu
            bin_ext: ""
          - os: ubuntu-latest
            target: aarch64-unknown-linux-gnu
            bin_ext: ""
          - os: macos-latest
            target: x86_64-apple-darwin
            bin_ext: ""
          - os: macos-latest
            target: aarch64-apple-darwin
            bin_ext: ""
          - os: windows-latest
            target: x86_64-pc-windows-msvc
            bin_ext: ".exe"
          - os: windows-latest
            target: aarch64-pc-windows-msvc
            bin_ext: ".exe"

    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - run: cargo build --release --bin oxidelta --target ${{ matrix.target }}

      - name: Package artifact (Unix)
        if: runner.os != 'Windows'
        shell: bash
        run: |
          mkdir -p dist
          cp "target/${{ matrix.target }}/release/oxidelta" "dist/oxidelta-${{ matrix.target }}"

      - name: Package artifact (Windows)
        if: runner.os == 'Windows'
        shell: pwsh
        run: |
          New-Item -ItemType Directory -Path dist -Force | Out-Null
          Copy-Item "target/${{ matrix.target }}/release/oxidelta${{ matrix.bin_ext }}" "dist/oxidelta-${{ matrix.target }}${{ matrix.bin_ext }}"

      - uses: actions/upload-artifact@v4
        with:
          name: oxidelta-${{ matrix.target }}
          path: dist/*