name: Release

permissions:
  contents: write

on:
  push:
    tags:
      - 'v[0-9]+.*'

jobs:
  upload-assets:
    name: ${{ matrix.target }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: aarch64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-apple-darwin
            os: macos-13
          - target: aarch64-apple-darwin
            os: macos-latest
          - target: x86_64-pc-windows-msvc
            os: windows-latest
    steps:
      - uses: actions/checkout@v4
      - uses: taiki-e/upload-rust-binary-action@v1
        with:
          bin: boppo
          target: ${{ matrix.target }}
          archive: boppo-$tag-$target
          token: ${{ secrets.GITHUB_TOKEN }}
