cres 0.9.1

Cell resampling for collider events
Documentation
name: release
on:
  push:
    tags:
      - '[0-9]+.[0-9]+.[0-9]+'
      - '[0-9]+.[0-9]+.[0-9]+-*'

env:
  PROJECT: cres
  CARGO_TERM_COLOR: always

jobs:
  create-release:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
    - uses: actions/checkout@v4
    - uses: ncipollo/release-action@v1
      with:
        token: ${{ secrets.GITHUB_TOKEN }}

  publish-linux:
    name: Publish for ${{ matrix.target }}
    needs: create-release
    runs-on: ubuntu-latest
    strategy:
      matrix:
        target:
          - x86_64-unknown-linux-gnu
          - x86_64-unknown-linux-musl
          - i686-unknown-linux-gnu
          - i686-unknown-linux-musl
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - run: sudo apt update
      - run: sudo apt install musl-tools gcc-multilib
      - run: cargo build --target ${{ matrix.target }} --release --features capi,stripper-xml
      - run: ci/make_tarball.sh ${{ matrix.target }}
      - uses: svenstaro/upload-release-action@v2
        with:
          file: cres.tar.gz
          asset_name: cres-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ github.ref_name }}

  publish-macos:
    name: Publish for x86_64-apple-darwin
    needs: create-release
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: x86_64-apple-darwin
      - run: cargo build --target x86_64-apple-darwin --release --features capi,stripper-xml
      - run: ci/make_tarball.sh x86_64-apple-darwin
      - uses: svenstaro/upload-release-action@v2
        with:
          file: cres.tar.gz
          asset_name: cres-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ github.ref_name }}

  publish-windows:
    name: Publish for ${{ matrix.target }}
    needs: create-release
    runs-on: windows-latest
    strategy:
      matrix:
        target:
          - x86_64-pc-windows-msvc
          - i686-pc-windows-msvc
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          targets: ${{ matrix.target }}
      - run: cargo build --target ${{ matrix.target }} --release --features stripper-xml
      - run: 7z a cres.zip .\target\${{ matrix.target }}\release\cres.exe
      - uses: svenstaro/upload-release-action@v2
        with:
          file: cres.zip
          asset_name: cres-${{ github.ref_name }}-${{ matrix.target }}.zip
          repo_token: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ github.ref_name }}