chatpack 0.5.1

Prepare chat data for RAG / LLM ingestion. Supports Telegram, WhatsApp, Instagram, Discord.
Documentation
name: Release

on:
  push:
    tags:
      - 'v*'

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: Build ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
            name: chatpack-linux-x64
          - target: x86_64-apple-darwin
            os: macos-latest
            name: chatpack-macos-x64
          - target: aarch64-apple-darwin
            os: macos-latest
            name: chatpack-macos-arm64
          - target: x86_64-pc-windows-msvc
            os: windows-latest
            name: chatpack-windows-x64.exe

    steps:
      - uses: actions/checkout@v4

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

      - name: Build
        run: cargo build --release --target ${{ matrix.target }}

      - name: Rename binary (Unix)
        if: runner.os != 'Windows'
        run: |

          mv target/${{ matrix.target }}/release/chatpack ${{ matrix.name }}

      - name: Rename binary (Windows)
        if: runner.os == 'Windows'
        run: |

          mv target/${{ matrix.target }}/release/chatpack.exe ${{ matrix.name }}

      - name: Upload artifact
        uses: actions/upload-artifact@v4
        with:
          name: ${{ matrix.name }}
          path: ${{ matrix.name }}

  release:
    name: Create Release
    needs: build
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v4

      - name: Download all artifacts
        uses: actions/download-artifact@v4
        with:
          path: artifacts

      - name: List artifacts
        run: find artifacts -type f

      - name: Create Release
        uses: softprops/action-gh-release@v1
        with:
          files: artifacts/*/*
          generate_release_notes: true
          draft: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}