Skip to content

Commit defa00e

Browse files
committed
Improved publish_ci code
1 parent 873fd78 commit defa00e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/publish_ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ jobs:
2020

2121
- name: Set Build Version
2222
run: |
23+
$documentName = "Directory.Build.props"
2324
$File = (
24-
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props"
25+
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path $documentName
2526
)[0].Node
2627
$version = "$($File.InnerText)-ci-$Env:GITHUB_RUN_ID"
2728
$File.InnerText = $version
28-
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.props))
29+
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath $documentName))
2930
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
3031
shell: pwsh
3132

0 commit comments

Comments
 (0)