From 28e6925ac14ace62cb4409a70f8ccef0e52738d2 Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 16 Sep 2024 11:48:48 -0500 Subject: [PATCH] Exclude uap in WinUI package, wasdk in UWP package (#500) * Exclude uwp target under WinUI 3 build and wasdk under WinUI 2 build. * Fixed typo in param name * Checkout repo at ref that triggered workflow run. * Revert "Checkout repo at ref that triggered workflow run." This reverts commit a9cb1b6687cdc0133ad7caee4917783dd310a0ba. * Fix incorrect step name when run under matrix * Update build.yml to include 'dev/*' branches in pull_request event --- .github/workflows/build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ebfdfd5..f142ec04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -261,9 +261,19 @@ jobs: with: vs-version: '[17.9,)' + - name: Define excluded MultiTargets (WinUI 2) + if: ${{ matrix.winui == '2' }} + run: | + echo "EXCLUDED_MULTITARGETS=wasdk" >> $env:GITHUB_ENV + + - name: Define excluded MultiTargets (WinUI 3) + if: ${{ matrix.winui == '3' }} + run: | + echo "EXCLUDED_MULTITARGETS=uwp" >> $env:GITHUB_ENV + # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release + run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludeMultiTargets ${{ env.EXCLUDED_MULTITARGETS }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release # Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config) - name: Push Pull Request Packages (if not fork)