Skip to content

Commit

Permalink
Adjust github workflow to new version number
Browse files Browse the repository at this point in the history
  • Loading branch information
chriwiz committed Nov 10, 2023
1 parent 2bd5563 commit e8d9572
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/czishrink_dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,16 @@ jobs:
id: getversion
run: |
$xml = [xml](Get-Content -Path "Directory.Build.props")
$version = $xml.SelectSingleNode('//VersionPrefix').'#text' + "-" + $xml.SelectSingleNode('//VersionSuffix').'#text'
$version = $xml.SelectSingleNode('//VersionPrefix').'#text'
"version=$version" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
shell: pwsh

- name: Add build ID to version in Directory.Build.props
run: |
Write-Output "Add build ID ${{ github.run_id }} to VersionSuffix in Directory.Build.props"
Write-Output "Add build ID ${{ github.run_id }} to VersionPrefix in Directory.Build.props"
$file = Get-Item "Directory.Build.props"
$xml = [xml](Get-Content -Path $file.FullName)
$versionElement = $xml.SelectSingleNode('//VersionSuffix')
$versionElement = $xml.SelectSingleNode('//VersionPrefix')
$versionElement.'#text' += '+${{ github.run_id }}'
$xml.Save($file.FullName)
shell: pwsh
Expand Down

0 comments on commit e8d9572

Please sign in to comment.