name: Build

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: windows-2022

    steps:
    - name: Checkout
      uses: actions/checkout@v3
    - name: Setup .NET
      uses: actions/setup-dotnet@v3
      with:
        dotnet-version: 8.0.x
    - name: Restore
      run: dotnet restore
    - name: Build
      run: .\make.bat
    - name: Upload artifact
      uses: actions/upload-artifact@v3
      with:
        name: installer
        path: build_installer\LenovoLegionToolkitSetup.exe
