Skip to content

Commit 4945f73

Browse files
Update logic for Versioning of Build and ensure to pass to Packing Script
1 parent 51bef1d commit 4945f73

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/build.yml

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

7071
# Steps represent a sequence of tasks that will be executed as part of the job
7172
steps:
@@ -124,12 +125,12 @@ jobs:
124125
if: ${{ matrix.platform == 'WinUI3' }}
125126

126127
- name: MSBuild
127-
run: msbuild.exe CommunityToolkit.AllComponents.sln /restore /nowarn:MSB4011 -p:Configuration=Release -m ${{ github.ref == 'refs/heads/main' && '' || format('-p:PreviewVersion="pull-{0}+build.{1}"', github.event.number, github.run_number) }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '/bl' || '' }} -v:${{ env.MSBUILD_VERBOSITY }}
128+
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 }}
128129

129130
# Build All Packages
130131
- name: pack experiments
131132
working-directory: ./tooling/Scripts/
132-
run: ./PackEachExperiment.ps1 all
133+
run: ./PackEachExperiment.ps1 -extraBuildProperties "${{ env.VERSION_PROPERTY }}"
133134

134135
# Push Packages to our DevOps Artifacts Feed (see nuget.config)
135136
- name: Add source (main)

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<MajorVersion>8</MajorVersion>
44
<MinorVersion>0</MinorVersion>
5-
<PreviewVersion Condition="'$(PreviewVersion)' == ''">preview</PreviewVersion>
5+
<PreviewVersion>preview</PreviewVersion>
66

77
<PackageIdPrefix>CommunityToolkit</PackageIdPrefix>
88
<RepositoryDirectory>$([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)'))</RepositoryDirectory>

tooling

0 commit comments

Comments
 (0)