name: Build

on:
  pull_request:
    branches:
      - master

jobs:
  build:
    name: Build
    runs-on: windows-2022

    steps:
    - uses: actions/checkout@v3

    - name: Setup MSBuild
      uses: microsoft/setup-msbuild@v1

    - name: Setup NuGet
      uses: nuget/setup-nuget@v1

    - name: Navigate to Workspace
      run: cd $GITHUB_WORKSPACE

    - name: Restore Packages
      run: nuget restore Optimizer.sln

    - name: Build Solution
      run: msbuild.exe Optimizer.sln
