sassy 0.2.1

Approximate string matching using SIMD
Documentation
name: Release

permissions:
  contents: write

on:
  push:
    # Run on v* tags pushed.
    tags:
      - "v*"
  # Allow manual triggering.
  workflow_dispatch:

jobs:
  build:
    strategy:
      matrix:
        include:
          - os: ubuntu-22.04
            target: x86_64-unknown-linux-gnu
          - os: ubuntu-22.04-arm
            target: aarch64-unknown-linux-gnu
          - os: macos-14
            target: aarch64-apple-darwin

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Build & test & rename
        run: |
          mv .cargo/config-portable.toml .cargo/config.toml
          cargo build --no-default-features
          cargo build --profile dist
          cargo test --profile dist

          mkdir artifacts
          mv target/dist/sassy artifacts/sassy-${{ matrix.target }}

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

  release:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with:
          path: release_artifacts

      - name: Create GitHub Release
        uses: softprops/action-gh-release@v2
        with:
          files: release_artifacts/**/*
          draft: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}