From defa00e7d2016b77826b158ea5c703f9ef2931fc Mon Sep 17 00:00:00 2001 From: Andrii Chebukin Date: Wed, 20 Nov 2024 16:31:55 +0400 Subject: [PATCH] Improved `publish_ci` code --- .github/workflows/publish_ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish_ci.yml b/.github/workflows/publish_ci.yml index d285c432..eced3c03 100644 --- a/.github/workflows/publish_ci.yml +++ b/.github/workflows/publish_ci.yml @@ -20,12 +20,13 @@ jobs: - name: Set Build Version run: | + $documentName = "Directory.Build.props" $File = ( - Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props" + Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path $documentName )[0].Node $version = "$($File.InnerText)-ci-$Env:GITHUB_RUN_ID" $File.InnerText = $version - $File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.props)) + $File.OwnerDocument.Save((Join-Path $PWD.ProviderPath $documentName)) echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append shell: pwsh