cirnogodot/Publish.ps1

34 lines
1.3 KiB
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
2025-05-03 16:48:24 +02:00
$zipFileName = "$fileName.$fullSemVer.win.zip"
$zipFileNameLinux = "$fileName.$fullSemVer.linux.zip"
2025-02-24 17:17:46 +01:00
$zipFilePath = "$zipOutputDir\$zipFileName"
2025-05-03 16:48:24 +02:00
$zipFilePathLinux = "$zipOutputDir\$zipFileNameLinux"
2025-02-24 17:17:46 +01:00
# Zip the build folder
if (!(Test-Path $zipOutputDir)) {
New-Item -ItemType Directory -Path $zipOutputDir | Out-Null
}
2025-05-03 16:48:24 +02:00
Compress-Archive -Path "$buildDir\win\*" -DestinationPath $zipFilePath -Force
#Compress-Archive -Path "$buildDir\*" -DestinationPath $zipFilePath -Force
2025-02-24 17:17:46 +01:00
2025-04-26 17:07:43 +02:00
Write-Host "Windows Build completed and packaged as $zipFilePath"
2025-02-24 17:17:46 +01:00
2025-05-02 18:12:33 +02:00
#Compress-Archive -Path "$buildDir\linux\*" -DestinationPath $zipFilePathLinux -Force
2025-04-26 17:07:43 +02:00
2025-05-03 16:48:24 +02:00
#Write-Host "Linux Build completed and packaged as $zipFilePathLinux"
2025-04-26 17:07:43 +02:00
& $butlerPath push $zipFilePath maddoscientisto/cirno-no-reason:windows$PreReleaseLabel --userversion $fullSemVer
2025-05-02 18:12:33 +02:00
#& $butlerPath push $zipFilePathLinux maddoscientisto/cirno-no-reason:linux$PreReleaseLabel --userversion $fullSemVer