name: Copilot Setup Steps

on: workflow_dispatch

jobs:
  copilot-setup-steps:
    runs-on: ubuntu-latest

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

      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'

      - name: Configure private NuGet source credentials
        # NuGet.Config points to the private Integry feed; CI secrets provide auth.
        # Set NUGET_USERNAME and NUGET_PASSWORD in repository secrets.
        run: |
          dotnet nuget update source integry \
            --username "${{ secrets.NUGET_USERNAME }}" \
            --password "${{ secrets.NUGET_PASSWORD }}" \
            --store-password-in-clear-text

      - name: Restore dependencies
        run: dotnet restore Fixiy.sln

      - name: Build Fixiy.Web
        # MAUI builds require platform-specific workloads not available on ubuntu-latest.
        # Fixiy.Web covers the shared Blazor component tree and validates the full build.
        run: dotnet build Fixiy.Web/Fixiy.Web.csproj --no-restore -c Debug
