Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions publish-all.ps1
Original file line number Diff line number Diff line change
@@ -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"