File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 99
99
else {
100
100
# Get the version suffix from the auto-incrementing build number. For example: '123' => 'master-00123'
101
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"
102
+ $branchName = ![string]::IsNullOrEmpty($env:GITHUB_HEAD_REF) ? $env:GITHUB_HEAD_REF : $env:GITHUB_REF_NAME
103
+ $safeName = $branchName.Replace('/', '-')
104
+ $versionSuffix = "$safeName-$revision"
103
105
}
104
106
Write-Output "Using version suffix: $versionSuffix"
105
107
Write-Output "PACKAGE_VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
You can’t perform that action at this time.
0 commit comments