mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
CI - Allow for non-master nugets, manually.
This commit is contained in:
parent
3758275b71
commit
22268fc945
3
.github/workflows/nuget.yml
vendored
3
.github/workflows/nuget.yml
vendored
@ -21,9 +21,12 @@ jobs:
|
||||
shell: pwsh
|
||||
run: |
|
||||
$MidnightUtc = [DateTime]::UtcNow.Date
|
||||
$BranchName = "${{ github.ref_name }}".replace('/','-').replace('.','-')
|
||||
$ApiVersion = (Select-Xml -Path 'src/Artemis.Core/Artemis.Core.csproj' -XPath '//PluginApiVersion').Node.InnerText
|
||||
$NumberOfCommitsToday = (git log --after=$($MidnightUtc.ToString("o")) --oneline | Measure-Object -Line).Lines
|
||||
$VersionNumber = "$ApiVersion.$($MidnightUtc.ToString("yyyy.MMdd")).$NumberOfCommitsToday"
|
||||
# If we're not in master, add the branch name to the version so it counts as prerelease
|
||||
if ($BranchName -ne "master") { $VersionNumber += "-$BranchName" }
|
||||
Write-Output "::set-output name=version-number::$VersionNumber"
|
||||
|
||||
nuget:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user