@@ -109,6 +109,7 @@ jobs:
109109 uses : actions/checkout@v4
110110 with :
111111 submodules : recursive
112+ fetch-depth : 0
112113
113114 # Restore Tools from Manifest list in the Repository
114115 - name : Restore dotnet tools
@@ -132,10 +133,15 @@ jobs:
132133 with :
133134 vs-version : ' [17.9,)'
134135
136+ - name : Get changed components
137+ run : |
138+ $components = ./tooling/Get-Changed-Components.ps1
139+ echo "CHANGED_COMPONENTS_LIST=$components" >> $env:GITHUB_ENV
140+
135141 # Generate full solution with all projects (sample gallery heads, components, tests)
136142 - name : Generate solution with ${{ matrix.multitarget }} gallery, components and tests
137143 working-directory : ./
138- run : powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
144+ run : powershell -version 5.1 -command "./tooling/GenerateAllSolution.ps1 -MultiTargets ${{ matrix.multitarget }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && ' -UseDiagnostics' || '' }} -Components ${{ env.CHANGED_COMPONENTS_LIST }} - WinUIMajorVersion ${{ matrix.winui }}" -ErrorAction Stop
139145
140146 # Build solution
141147 - name : MSBuild (With diagnostics)
@@ -233,6 +239,7 @@ jobs:
233239 uses : actions/checkout@v4
234240 with :
235241 submodules : recursive
242+ fetch-depth : 0
236243
237244 - name : Format Date/Time of Commit for Package Version
238245 run : |
@@ -257,9 +264,15 @@ jobs:
257264 with :
258265 vs-version : ' [17.9,)'
259266
267+ # Get changed components
268+ - name : Get changed components
269+ run : |
270+ $components = ./tooling/Get-Changed-Components.ps1
271+ echo "CHANGED_COMPONENTS_LIST=$components" >> $env:GITHUB_ENV
272+
260273 # Build and pack component nupkg
261274 - 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
275+ 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
263276
264277 - name : Validate package names
265278 if : ${{ env.VERSION_PROPERTY != '' }}
0 commit comments