From abb9e423e4bd42512081874d93600a93f9e291d8 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Fri, 6 Sep 2024 12:37:25 -0500 Subject: [PATCH 1/6] Exclude uwp target under WinUI 3 build and wasdk under WinUI 2 build. --- .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 410265ad..d342f7a1 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 ${{ matrix.winui }}) + if: ${{ matrix.winui == '2' }} + run: | + echo "EXCLUDED_MULTITARGETS=wasdk" >> $env:GITHUB_ENV + + - name: Define excluded MultiTargets (WinUI ${{ matrix.winui }}) + 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 -ExcludedMultiTargets ${{ 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) From 952b239d854bd9cfe46aa7cf997345ab19453dfc Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Mon, 9 Sep 2024 15:20:01 -0500 Subject: [PATCH 2/6] Fixed typo in param name --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d342f7a1..5fa1218c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -273,7 +273,7 @@ jobs: # Build and pack component nupkg - name: Build and pack component packages - run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -ExcludedMultiTargets ${{ 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 + 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) From a9cb1b6687cdc0133ad7caee4917783dd310a0ba Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Tue, 10 Sep 2024 14:24:43 -0500 Subject: [PATCH 3/6] Checkout repo at ref that triggered workflow run. --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fa1218c..fc645a8d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools @@ -105,6 +106,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools @@ -227,6 +229,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.ref }} # Semver regex: https://regex101.com/r/Ly7O1x/3/ - name: Format Date/Time of Release Package Version @@ -425,6 +428,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive + ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools From 0eb1bf44ca222df56e8fe22389ba72a49e0f9d73 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 11 Sep 2024 12:25:21 -0500 Subject: [PATCH 4/6] Revert "Checkout repo at ref that triggered workflow run." This reverts commit a9cb1b6687cdc0133ad7caee4917783dd310a0ba. --- .github/workflows/build.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc645a8d..5fa1218c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools @@ -106,7 +105,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools @@ -229,7 +227,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref }} # Semver regex: https://regex101.com/r/Ly7O1x/3/ - name: Format Date/Time of Release Package Version @@ -428,7 +425,6 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - ref: ${{ github.ref }} # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools From 7371119badebc10e21b095b5a0a073975713c3d2 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Wed, 11 Sep 2024 12:26:10 -0500 Subject: [PATCH 5/6] Fix incorrect step name when run under matrix --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5fa1218c..46ed6c52 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -261,12 +261,12 @@ jobs: with: vs-version: '[17.9,)' - - name: Define excluded MultiTargets (WinUI ${{ matrix.winui }}) + - name: Define excluded MultiTargets (WinUI 2) if: ${{ matrix.winui == '2' }} run: | echo "EXCLUDED_MULTITARGETS=wasdk" >> $env:GITHUB_ENV - - name: Define excluded MultiTargets (WinUI ${{ matrix.winui }}) + - name: Define excluded MultiTargets (WinUI 3) if: ${{ matrix.winui == '3' }} run: | echo "EXCLUDED_MULTITARGETS=uwp" >> $env:GITHUB_ENV From c859b6e44dd75062b95c24845831962d0aee6cd3 Mon Sep 17 00:00:00 2001 From: Arlo Godfrey Date: Thu, 12 Sep 2024 14:36:45 -0500 Subject: [PATCH 6/6] Update build.yml to include 'dev/*' branches in pull_request event --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46ed6c52..331d753f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ on: push: branches: [ main, 'rel/*' ] pull_request: - branches: [ main ] + branches: [ main, 'dev/*' ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: