Skip to content

Commit f13e7e6

Browse files
Add a fix for having inconsistent version numbers between the WinUI 2 and WinUI 3 Jobs
1 parent 7b46412 commit f13e7e6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ env:
2424
COREHOST_TRACEFILE: corehosttrace.log
2525
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
2626
HEADS_DIRECTORY: tooling/ProjectHeads
27+
COMMIT_DATE: ${{ github.event.repository.updated_at }}
2728
IS_MAIN: ${{ github.ref == 'refs/heads/main' }}
2829
IS_PR: ${{ startsWith(github.ref, 'refs/pull/') }}
2930
IS_RELEASE: ${{ startsWith(github.ref, 'refs/heads/rel/') }}
@@ -127,13 +128,19 @@ jobs:
127128
working-directory: ./${{ env.MULTI_TARGET_DIRECTORY }}
128129
run: powershell -version 5.1 -command "./UseUnoWinUI.ps1 3" -ErrorAction Stop
129130

131+
# TODO: On Release we should get date from rel/ branch name
132+
- name: Format Date/Time of Commit for Package Version
133+
id: version-date
134+
run: |
135+
echo "VERSION_DATE=$(Get-Date $env:COMMIT_DATE -Format 'yyMMdd')" >> $env:GITHUB_OUTPUT
136+
130137
- name: MSBuild
131-
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m ${{ env.VERSION_PROPERTY }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }}
138+
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m -p:DateForVersion=${{ steps.version-date.outputs.VERSION_DATE }} ${{ env.VERSION_PROPERTY }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }}
132139

133140
# Build All Packages
134141
- name: pack experiments
135142
working-directory: ./tooling/Scripts/
136-
run: ./PackEachExperiment.ps1 -extraBuildProperties "${{ env.VERSION_PROPERTY }}"
143+
run: ./PackEachExperiment.ps1 -extraBuildProperties "-p:DateForVersion=${{ steps.version-date.outputs.VERSION_DATE }} ${{ env.VERSION_PROPERTY }}"
137144

138145
# Push Pull Request Packages to our DevOps Artifacts Feed (see nuget.config)
139146
- name: Push Pull Request Packages

tooling

0 commit comments

Comments
 (0)