Skip to content

Commit

Permalink
Improved publish_ci code
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Nov 20, 2024
1 parent 873fd78 commit defa00e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit defa00e

Please sign in to comment.