From b8d8ec548d43da6fbe4e521d2894d9b725f89f5f Mon Sep 17 00:00:00 2001 From: Eduardo Rezende Date: Sat, 16 Aug 2025 22:42:43 -0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feat:=20Add=20publish-all.ps1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding script to publish AutoDoc to all runtimes --- publish-all.ps1 | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 publish-all.ps1 diff --git a/publish-all.ps1 b/publish-all.ps1 new file mode 100644 index 0000000..13f3632 --- /dev/null +++ b/publish-all.ps1 @@ -0,0 +1,39 @@ +# publish-all.ps1 + +# Runtimes +$runtimes = @("win-x64", "linux-x64", "osx-x64") + +# Configurations +$configuration = "Release" +$selfContained = "true" +$projectPath = "AutoDoc.csproj" +$desktopPath = [Environment]::GetFolderPath("Desktop") +$outputBase = Join-Path $desktopPath "AutoDocBuilds" + +# Create folder at Desktop +if (-Not (Test-Path $outputBase)) { + New-Item -ItemType Directory -Path $outputBase | Out-Null +} + +foreach ($rid in $runtimes) { + Write-Host "🔨 Publishing for $rid..." + + # Folder per rid + $publishDir = Join-Path $outputBase "publish-$rid" + $zipFile = Join-Path $outputBase "AutoDoc-$rid.zip" + + # Publish + dotnet publish $projectPath -c $configuration -r $rid --self-contained $selfContained -o $publishDir + + # Remove last zip id exists + if (Test-Path $zipFile) { + Remove-Item $zipFile + } + + # Compress only publish folder + Compress-Archive -Path (Join-Path $publishDir "*") -DestinationPath $zipFile + + Write-Host "✅ Generated: $zipFile" +} + +Write-Host "🎉 All builds were done. Look at: $outputBase"