$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" & $butlerPath push $zipFilePath maddoscientisto/cirno-no-reason:windows$PreReleaseLabel --userversion $fullSemVer