Skip to content

Commit 97f60a2

Browse files
Pass in date and version more explicitly to msbuild and powershell pack script
1 parent b5be4e7 commit 97f60a2

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
# faux-ternary expression to select which platforms to build for each platform vs. duplicating step below.
7070
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }}
7171
TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }}
72-
VERSION_PROPERTY: ${{ github.ref == 'refs/heads/main' && format('PreviewVersion=build.{0}', github.run_number) || format('PreviewVersion=pull-{0}.{1}', github.event.number, github.run_number) }}
72+
VERSION_PROPERTY: ${{ github.ref == 'refs/heads/main' && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
7373

7474
# Steps represent a sequence of tasks that will be executed as part of the job
7575
steps:
@@ -133,12 +133,20 @@ jobs:
133133
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
134134
135135
- name: MSBuild
136-
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m -p:DateForVersion=${{ env.VERSION_DATE }};${{ env.VERSION_PROPERTY }}; ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }}
136+
run: >
137+
msbuild.exe /restore /nowarn:MSB4011
138+
/p:Configuration=Release
139+
/m
140+
/p:DateForVersion=${{ env.VERSION_DATE }}
141+
/p:PreviewVersion=${{ env.VERSION_PROPERTY }}
142+
${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }}
143+
/v:${{ env.MSBUILD_VERBOSITY }}
144+
CommunityToolkit.AllComponents.sln
137145
138146
# Build All Packages
139147
- name: pack experiments
140148
working-directory: ./tooling/Scripts/
141-
run: ./PackEachExperiment.ps1 -extraBuildProperties "-p:DateForVersion=${{ env.VERSION_DATE }};${{ env.VERSION_PROPERTY }};"
149+
run: ./PackEachExperiment.ps1 -date ${{ env.VERSION_DATE }} -postfix ${{ env.VERSION_PROPERTY }}
142150

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

tooling

0 commit comments

Comments
 (0)