diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index e3569231..4e882d42 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -217,6 +217,33 @@ jobs: run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:restore /property:Configuration=Release shell: cmd + # Build the WinUI project again to generate a NuGet package from it. + # This workflow also uploads the resulting package as an artifact. + build-package-winui: + if: success() + needs: [build-project-winui] + runs-on: windows-latest + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 5.0.x + - name: Build + run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:restore /property:Configuration=Release + shell: cmd + - name: Pack + run: msbuild src\ComputeSharp.WinUI\ComputeSharp.WinUI.csproj -t:pack /property:Configuration=Release + shell: cmd + - name: Upload package artifact + uses: actions/upload-artifact@v2 + with: + name: ComputeSharp.WinUI.nupkg + path: src\ComputeSharp.WinUI\bin\Release\*.nupkg + # Build all the local WinUI samples to ensure they build with no errors build-samples-winui: if: success()