From a349455a0d5dec57244a1ef34f7834f62186a98e Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 11 May 2022 18:22:21 +0200 Subject: [PATCH 1/3] Configure MSBuild scripts for official NuGet builds --- Directory.Build.props | 27 +++++++++++++++++++++++++-- Directory.Build.targets | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 86d987a3..6b5b8f5d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -19,13 +19,36 @@ --> 2.0.0 + false + + + ^rel/(\d{1,4}\.\d{1,4}\.\d{1,4})(?:-(\w+(?:\.\w+)?))?$ + $([System.Text.RegularExpressions.Regex]::IsMatch($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex))) + + + + + true + $([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[1].Value) + $([System.Text.RegularExpressions.Regex]::Match($(GITHUB_REF_NAME), $(ReleaseVersionParsingRegex)).Groups[2].Value) + $(ComputeSharpPackageVersionFromReleaseBranch) + $(ComputeSharpPackageVersionSuffixFromReleaseBranch) + + + $(ComputeSharpPackageVersion).0 $(ComputeSharpPackageVersion) - alpha - pr + alpha + pr + + + true https://github.com/Sergio0694/ComputeSharp/ git diff --git a/Directory.Build.targets b/Directory.Build.targets index f483ec4f..3bdad439 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -22,7 +22,7 @@ - $(Version).$(GITHUB_RUN_ID) + $(Version).$(GITHUB_RUN_ID) $(PackageVersion)+$(GITHUB_SHA) From 0d936b2cd8e617b119e187850db2d112263bc5fb Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 11 May 2022 23:33:13 +0200 Subject: [PATCH 2/3] Enable binary logging for debug builds in CI --- .github/workflows/dotnet.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d7c6ef14..376a3445 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -25,8 +25,14 @@ jobs: with: dotnet-version: 6.0.x - name: Build - run: msbuild -t:restore,build /p:Configuration=Debug /p:Platform=x64 + run: msbuild -t:restore,build /p:Configuration=Debug /p:Platform=x64 /bl shell: cmd + - name: Upload MSBuild binary log + uses: actions/upload-artifact@v2 + with: + name: msbuild_log + path: msbuild.binlog + if-no-files-found: error # Build the whole ComputeSharp solution, in Release build-solution-release: From e386d29640901f8eb35409b90dc1f32fc523a1fb Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Thu, 12 May 2022 00:03:49 +0200 Subject: [PATCH 3/3] Fix not being set for release branches --- Directory.Build.targets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 3bdad439..7ceecbc6 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -15,9 +15,14 @@ of dotnet build for some cases, due to the solution having some UWP and WinUI 3 projects, and non SDK-style too). The lines setting the prefix have been omitted, as that is already handled in the root .props file. --> - - $(VersionPrefix)-$(VersionSuffix) - $(VersionPrefix) + + $(VersionPrefix)-$(VersionSuffix) + $(VersionPrefix) + + + + + $(Version) @@ -25,9 +30,4 @@ $(Version).$(GITHUB_RUN_ID) $(PackageVersion)+$(GITHUB_SHA) - - - - $(Version) - \ No newline at end of file