From 74f1934df77f70505404272f1d3c28f4814c9887 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 18 Nov 2024 17:11:46 -0600 Subject: [PATCH] Add support for excluding MultiTargets in build workflow based on WinUI version --- .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 02c0edab0..f77d77829 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -257,9 +257,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 - name: Validate package names if: ${{ env.VERSION_PROPERTY != '' }}