cirnogodot/Publish.ps1

25 lines
899 B
PowerShell
Raw Normal View History

2025-02-24 17:17:46 +01:00
$butlerPath = "F:\Apps\butler\butler.exe"
$zipOutputDir = ".\release"
$fileName = "Cirno_No_Reason"
$gitVersionPath = "dotnet-gitversion.exe"
$buildDir = ".\build"
$gitVersionOutput = & $gitVersionPath | ConvertFrom-Json
$assemblySemFileVer = $gitVersionOutput.AssemblySemFileVer
$assemblySemVer = $gitVersionOutput.AssemblySemVer
$fullSemVer = $gitVersionOutput.FullSemVer
$PreReleaseLabel = $gitVersionOutput.PreReleaseLabelWithDash
$zipFileName = "$fileName.$fullSemVer.zip"
$zipFilePath = "$zipOutputDir\$zipFileName"
# Zip the build folder
if (!(Test-Path $zipOutputDir)) {
New-Item -ItemType Directory -Path $zipOutputDir | Out-Null
}
Compress-Archive -Path "$buildDir\*" -DestinationPath $zipFilePath -Force
Write-Host "Build completed and packaged as $zipFilePath"
2025-02-24 21:56:57 +01:00
& $butlerPath push $zipFilePath maddoscientisto/cirno-no-reason:windows$PreReleaseLabel --userversion $fullSemVer