add workflow for 2.0.0 builds

This commit is contained in:
Andrew Welker
2020-11-24 13:14:07 -07:00
parent b67424c1e1
commit d52941d91d
2 changed files with 331 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
$latestVersion = [version]"2.0.0"
$newVersion = [version]$latestVersion
$phase = ""
$newVersionString = ""
switch -regex ($Env:GITHUB_REF) {
'^refs\/pull\/*.' {
$splitRef = $Env:GITHUB_REF -split "/"
$phase = "pr$($splitRef[2])"
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
}
'^refs\/heads\/feature-2.0.0\/*.' {
$phase = 'alpha'
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
}
'^refs\/heads\/development-2.0.0' {
$phase = 'beta'
$newVersionString = "{0}-{3}-{4}" -f $newVersion, $phase, $Env:GITHUB_RUN_NUMBER
}
}
Write-Output $newVersionString