aer 0.2.0

A command-line toolkit for creatives.
Documentation
---
name: Release

on:
  push:
    branches:
      - main
    paths:
      - ".github/workflows/release.yml"
      - "Cargo.toml"
      - "Cargo.lock"
      - "src/**"
  workflow_dispatch:

jobs:
  publish:
    runs-on: ubuntu-latest
    permissions:
      contents: write
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561
        with:
          toolchain: stable

      - name: Cache cargo registry and build
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            target
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
          restore-keys: |
            ${{ runner.os }}-cargo-

      - name: cargo fmt
        run: cargo fmt --check

      - name: cargo clippy
        run: cargo clippy -- -D warnings

      - name: cargo test
        run: cargo test

      - name: cargo build
        run: cargo build --release

      - name: Release `latest-linux-x86`
        env:
          GH_TOKEN: ${{ github.token }}
        run: |
          gh release upload latest-linux-x86 target/release/aer --clobber ||
            gh release create latest-linux-x86 target/release/aer --title "Latest Build (Linux x86)" --notes "Built from main branch"