name: Validate

on:
  push:
    branches:
      - master
      - main
  pull_request:

permissions:
  contents: read

env:
  DOTNET_VERSION: 10.0.x
  SOLUTION_PATH: XFEExtension.NetCore.ServerInteractive.slnx

jobs:
  build:
    runs-on: windows-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: ${{ env.DOTNET_VERSION }}

      - name: Restore
        run: dotnet restore ${{ env.SOLUTION_PATH }}

      - name: Build
        run: dotnet build ${{ env.SOLUTION_PATH }} --configuration Release --no-restore -p:GeneratePackageOnBuild=false -p:ContinuousIntegrationBuild=true
