mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 04:26:49 +00:00
add workflow for 2.0.0 builds
This commit is contained in:
parent
b67424c1e1
commit
d52941d91d
2 changed files with 331 additions and 0 deletions
24
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal file
24
.github/scripts/GenerateVersionNumber-2.0.0.ps1
vendored
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue