Skip to content

Commit

Permalink
Update logic for Versioning of Build and ensure to pass to Packing Sc…
Browse files Browse the repository at this point in the history
…ript
  • Loading branch information
michael-hawker committed Aug 15, 2023
1 parent 51bef1d commit 4945f73
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
# faux-ternary expression to select which platforms to build for each platform vs. duplicating step below.
TARGET_PLATFORMS: ${{ matrix.platform != 'WinUI3' && 'all' || 'all-uwp' }}
TEST_PLATFORM: ${{ matrix.platform != 'WinUI3' && 'UWP' || 'WinAppSdk' }}
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) }}

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

- name: MSBuild
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 }}
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 }}

# Build All Packages
- name: pack experiments
working-directory: ./tooling/Scripts/
run: ./PackEachExperiment.ps1 all
run: ./PackEachExperiment.ps1 -extraBuildProperties "${{ env.VERSION_PROPERTY }}"

# Push Packages to our DevOps Artifacts Feed (see nuget.config)
- name: Add source (main)
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<MajorVersion>8</MajorVersion>
<MinorVersion>0</MinorVersion>
<PreviewVersion Condition="'$(PreviewVersion)' == ''">preview</PreviewVersion>
<PreviewVersion>preview</PreviewVersion>

<PackageIdPrefix>CommunityToolkit</PackageIdPrefix>
<RepositoryDirectory>$([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)'))</RepositoryDirectory>
Expand Down
2 changes: 1 addition & 1 deletion tooling

0 comments on commit 4945f73

Please sign in to comment.