# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net

name: Stable

on:
  push:
    branches: [ "master" ]
  workflow_dispatch:

jobs:
  build:
    strategy:
      matrix:
        os: [windows-latest, ubuntu-latest]
        include:
          - os: windows-latest
            build: Campofinale-${{github.ref_name}}-Windows
          - os: ubuntu-latest
            build: Campofinale-${{github.ref_name}}-Linux
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v4
    - name: Setup .NET
      uses: actions/setup-dotnet@v4
      with:
        dotnet-version: 8.0.x
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore --configuration Release
    - name: Upload Artifacts
      uses: actions/upload-artifact@v4
      with:
          name: ${{ matrix.build }}
          path: Campofinale/bin/Release/net8.0
