99 # Triggers the workflow on push or pull request events but only for the main branch
1010 push :
1111 branches : [ main ]
12- tags : [ 'release/weekly/*' ]
12+ tags : [ 'release/weekly/** ' ]
1313 pull_request :
1414 branches : [ main ]
1515
16+ # Triggers on release publication (including automated weekly releases)
17+ # Note: Tag events don't trigger from GitHub Actions, but release events do
18+ # This allows scheduled-releases.yml to trigger builds via gh release create
19+ release :
20+ types : [published]
21+
1622 # Allows you to run this workflow manually from the Actions tab
1723 workflow_dispatch :
1824 merge_group :
3036jobs :
3137 # This workflow contains a single job called "Xaml-Style-Check"
3238 Xaml-Style-Check :
33- runs-on : windows-latest
39+ runs-on : windows-2022
3440
3541 # Steps represent a sequence of tasks that will be executed as part of the job
3642 steps :
37- # .NET 6 SDK is required for xamlstyler.console to run.
38- - name : Install .NET SDK v6
39- uses : actions/setup-dotnet@v4
40- with :
41- dotnet-version : 6.0.x
42-
4343 - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
4444 uses : actions/setup-dotnet@v4
4545 with :
6464 # Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix
6565 build :
6666 needs : [Xaml-Style-Check]
67- runs-on : windows-latest-large
67+ runs-on : windows-2022
6868
6969 # See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
7070 strategy :
@@ -82,10 +82,26 @@ jobs:
8282
8383 env :
8484 MULTI_TARGET_DIRECTORY : tooling/MultiTarget
85- VERSION_PROPERTY : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
85+ VERSION_PROPERTY : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/') ) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
8686
8787 # Steps represent a sequence of tasks that will be executed as part of the job
8888 steps :
89+ # Filter release events to only process weekly releases
90+ # Note: Release events don't support pattern filtering, so we filter manually
91+ # This allows both manual releases and automated weekly releases to trigger builds
92+ - name : Filter release events
93+ if : github.event_name == 'release'
94+ id : filter-release
95+ run : |
96+ $tagName = "${{ github.event.release.tag_name }}"
97+ if ($tagName -match "^release/weekly/") {
98+ Write-Host "Matched weekly release tag: $tagName"
99+ exit 0
100+ } else {
101+ Write-Host "Tag does not match weekly pattern: $tagName - skipping build"
102+ exit 1
103+ }
104+
89105 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
90106 - name : Checkout Repository
91107 uses : actions/checkout@v4
@@ -155,6 +171,7 @@ jobs:
155171 --skip wsl
156172 --skip androidemulator
157173 --skip vswinworkloads
174+ --skip vswin
158175 --verbose
159176
160177 - name : Add msbuild to PATH
@@ -242,15 +259,15 @@ jobs:
242259 dotnet-dump analyze ${{ steps.filter.outputs.dump_files }} -c "clrstack" -c "pe -lines" -c "exit"
243260
244261 package :
245- runs-on : windows-latest-large
262+ runs-on : windows-2022
246263 needs : [build]
247264 strategy :
248265 fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
249266 matrix :
250267 winui : [0, 2, 3]
251268
252269 env :
253- VERSION_PROPERTY : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
270+ VERSION_PROPERTY : ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/') ) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
254271
255272 steps :
256273 - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
@@ -271,9 +288,11 @@ jobs:
271288 fetch-depth : 0
272289 fetch-tags : true
273290
274- - name : Format Date/Time of Commit for Package Version
291+ - name : Format Date/Time for Package Version (Tag builds only)
292+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
275293 run : |
276- echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
294+ $dateString = "${{ github.ref }}" -replace '^refs/tags/release/weekly/', ''
295+ echo "VERSION_DATE=$dateString" >> $env:GITHUB_ENV
277296
278297 - name : Restore dotnet tools
279298 run : dotnet tool restore
@@ -287,6 +306,7 @@ jobs:
287306 --skip wsl
288307 --skip androidemulator
289308 --skip vswinworkloads
309+ --skip vswin
290310 --verbose
291311
292312 - name : Add msbuild to PATH
@@ -314,7 +334,7 @@ jobs:
314334 # Build and pack component nupkg
315335 - name : Build and pack component packages
316336 if : ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
317- run : ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -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
337+ run : ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }} ${{ env.VERSION_DATE != '' && format(' -DateForVersion {0}', 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
318338
319339 - name : Validate package names
320340 if : ${{ env.VERSION_PROPERTY != '' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
@@ -366,14 +386,14 @@ jobs:
366386 sign :
367387 needs : [package]
368388 if : ${{ startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/') }}
369- runs-on : windows-latest
389+ runs-on : windows-2022
370390 permissions :
371391 id-token : write # Required for requesting the JWT
372392
373393 strategy :
374394 fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion.
375395 matrix :
376- winui : [2, 3]
396+ winui : [0, 2, 3]
377397
378398 steps :
379399 - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
@@ -438,7 +458,7 @@ jobs:
438458 strategy :
439459 fail-fast : false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion.
440460 matrix :
441- winui : [2, 3]
461+ winui : [0, 2, 3]
442462
443463 steps :
444464 - name : Install .NET SDK v${{ env.DOTNET_VERSION }}
0 commit comments