name: Nexamas UI CI

on:
  push:
  pull_request:
  workflow_dispatch:

jobs:
  quality:
    name: Commercial quality / build / package
    runs-on: windows-latest

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

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

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

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.x'

      - name: Install documentation metadata dependency
        shell: powershell
        run: python -m pip install --disable-pip-version-check -r .\tools\docs\requirements.txt

      - name: Run Nexamas UI quality suite
        shell: powershell
        run: .\tools\quality\Run-NexamasUIQuality.ps1

      - name: Write CI proof manifest
        shell: powershell
        run: .\eng\ci\Write-NexamasUICiProof.ps1 -PackageDirectory .\.artifacts\nuget -RequireStartupProbeLog -RequirePerformanceSmokeLog -RequireTestLogs -RequirePackedConsumerProofLog

      - name: Upload NuGet package
        uses: actions/upload-artifact@v4
        with:
          name: Nexamas UI-nuget
          path: .artifacts/nuget/*.nupkg

      - name: Upload quality proof
        uses: actions/upload-artifact@v4
        with:
          name: Nexamas UI-quality-proof
          path: .artifacts/**
