We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce570fc commit 402984eCopy full SHA for 402984e
.github/workflows/build.yml
@@ -99,7 +99,9 @@ jobs:
99
else {
100
# Get the version suffix from the auto-incrementing build number. For example: '123' => 'master-00123'
101
$revision = "{0:D5}" -f [convert]::ToInt32($env:GITHUB_RUN_NUMBER, 10)
102
- $versionSuffix = "$(![string]::IsNullOrEmpty($env:GITHUB_HEAD_REF) ? $env:GITHUB_HEAD_REF : $env:GITHUB_REF_NAME)-$revision"
+ $branchName = ![string]::IsNullOrEmpty($env:GITHUB_HEAD_REF) ? $env:GITHUB_HEAD_REF : $env:GITHUB_REF_NAME
103
+ $safeName = $branchName.Replace('/', '-').Replace('_', '-')
104
+ $versionSuffix = "$safeName-$revision"
105
}
106
Write-Output "Using version suffix: $versionSuffix"
107
Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
0 commit comments