name: release

on:
  push:
    tags: [ v* ]
  workflow_dispatch:

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        machine: [ windows-2022, ubuntu-20.04, macos-10.15 ]
    runs-on: ${{ matrix.machine }}
    steps:
      - uses: actions/checkout@v3.0.2
      - uses: actions/setup-dotnet@v2.1.0
        with:
          dotnet-version: | 
            3.1.x
            6.0.x
      - run: ./build.cmd
      - name: Upload binaries
        uses: actions/upload-artifact@v3.1.0
        if: always()
        with:
          name: bin-${{ matrix.machine }}
          path: bin/tracer-home
