From bee93ba21fa17bccaab7159126daa85b601887be Mon Sep 17 00:00:00 2001 From: claudiamurialdo <33756655+claudiamurialdo@users.noreply.github.com> Date: Mon, 20 Mar 2023 18:15:39 -0300 Subject: [PATCH] Define COMMIT_NUMBER environment var (#782) * Define COMMIT_NUMBER environment var to set the right FileVersion attribute on assembly files which was always 0. * Keep COMMIT_NUMBER local var as a msbuild parameter given that GITHUB_ENV var are not seen by the step that defined the var. It should be set a power shell var instead of a local var ( $Env:COMMIT_NUMBER = @($(git....) or keep msbuild explicit parameter /p:COMMIT_NUMBER=$COMMIT_NUMBER (cherry picked from commit f176e716dcee4719c3dceb51edc90a3cd7b260bb) --- .github/workflows/Build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index fbdf96489..e9c211092 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -96,6 +96,7 @@ jobs: Write-Output "Packge version to be used: $NUGET_PACKAGE_VERSION" echo "NUGET_PACKAGE_VERSION=$NUGET_PACKAGE_VERSION" >> $env:GITHUB_ENV + echo "COMMIT_NUMBER=$COMMIT_NUMBER" >> $env:GITHUB_ENV echo "IsPrerelease=$IsPrerelease" >> $env:GITHUB_ENV echo "::set-output name=NUGET_PACKAGE_VERSION::$NUGET_PACKAGE_VERSION"