Files
ILSpy/publish.ps1
T
Siegfried Pammer 8249983b7b Publish the Windows bundles per configuration
publish.ps1 now takes a -Configuration parameter (the workflow passes the
GNU-style --configuration <Debug|Release>, which pwsh binds to it) and uses
it for both the -c flag and the output paths. The win-x64 framework-dependent
bundle is produced for every configuration; the win-arm64 framework-dependent
and win-x64 self-contained bundles stay Release-only, matching what the zip
steps consume.

The build workflow publishes per-configuration before zipping, and the
framework-dependent binaries zip now reads straight from the publish output
(...\win-x64\publish\fwdependent) for the active configuration instead of
globbing the build output.

Assisted-by: Claude:claude-opus-4-8:Claude Code
2026-06-10 00:08:16 +02:00

27 lines
1.5 KiB
PowerShell

#!/usr/bin/env pwsh
# Publish the Windows distribution bundles. Invoked by the build workflow as:
# .\publish.ps1 --configuration <Debug|Release>
# The win-x64 framework-dependent bundle is produced for every configuration (the binaries zip).
# The win-arm64 framework-dependent and win-x64 self-contained bundles are Release-only.
param(
[ValidateSet('Debug', 'Release')]
[string]$Configuration = 'Release'
)
$ErrorActionPreference = 'Stop'
$base = "./ILSpy/bin/$Configuration/net10.0"
$output_x64 = "$base/win-x64/publish/fwdependent"
dotnet publish ./ILSpy/ILSpy.csproj -c $Configuration --no-restore --no-self-contained -r win-x64 -o $output_x64
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c $Configuration --no-restore --no-self-contained -r win-x64 -o $output_x64
if ($Configuration -eq 'Release') {
$output_arm64 = "$base/win-arm64/publish/fwdependent"
dotnet publish ./ILSpy/ILSpy.csproj -c $Configuration --no-restore --no-self-contained -r win-arm64 -o $output_arm64
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c $Configuration --no-restore --no-self-contained -r win-arm64 -o $output_arm64
$output_x64_selfcontained = "$base/win-x64/publish/selfcontained"
dotnet publish ./ILSpy/ILSpy.csproj -c $Configuration --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c $Configuration --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained
}