Skip to content

Commit 74f1934

Browse files
committed
Add support for excluding MultiTargets in build workflow based on WinUI version
1 parent ba694e0 commit 74f1934

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,19 @@ jobs:
257257
with:
258258
vs-version: '[17.9,)'
259259

260+
- name: Define excluded MultiTargets (WinUI 2)
261+
if: ${{ matrix.winui == '2' }}
262+
run: |
263+
echo "EXCLUDED_MULTITARGETS=wasdk" >> $env:GITHUB_ENV
264+
265+
- name: Define excluded MultiTargets (WinUI 3)
266+
if: ${{ matrix.winui == '3' }}
267+
run: |
268+
echo "EXCLUDED_MULTITARGETS=uwp" >> $env:GITHUB_ENV
269+
260270
# Build and pack component nupkg
261271
- name: Build and pack component packages
262-
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
272+
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
263273

264274
- name: Validate package names
265275
if: ${{ env.VERSION_PROPERTY != '' }}

0 commit comments

Comments
 (0)