Browse Source

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
pull/3755/head
Siegfried Pammer 4 weeks ago
parent
commit
8249983b7b
  1. 31
      .github/workflows/build-ilspy.yml
  2. 32
      publish.ps1

31
.github/workflows/build-ilspy.yml

@ -102,40 +102,26 @@ jobs:
paths: "test-results/${{ matrix.configuration }}/*.trx" paths: "test-results/${{ matrix.configuration }}/*.trx"
folded: true folded: true
- name: Verify package contents - name: Publish x64/arm64 framework-dependent/self-contained
if: matrix.configuration == 'debug'
shell: pwsh shell: pwsh
run: | run: .\publish.ps1 -Configuration ${{ matrix.configuration }}
.\BuildTools\create-filelists.ps1
# Only the *.filelist outputs of the script are under verification here; restore may
# legitimately rewrite OS-specific packages.lock.json files, which must not fail this step.
git diff --exit-code -- '*.filelist'
- name: Zip ILSpy (framework-dependent) - name: Zip ILSpy (framework-dependent)
run: > run: >
7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*.dll .\ILSpy\bin\${{ matrix.configuration }}\net10.0\win-x64\publish\fwdependent\*
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*.exe
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*.config
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*.json
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*\ILSpy.resources.dll
.\ILSpy\bin\${{ matrix.configuration }}\net10.0\*\ILSpy.ReadyToRun.Plugin.resources.dll
- name: Publish x64/arm64 framework-dependent/self-contained
shell: pwsh
run: .\publish.ps1
- name: Zip ILSpy Release (x64 self-contained) - name: Zip ILSpy Release (x64 self-contained)
if: matrix.configuration == 'release' if: matrix.configuration == 'release'
run: > run: >
7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip
.\ILSpy\bin\Release\net10.0-windows\win-x64\publish\selfcontained\* .\ILSpy\bin\Release\net10.0\win-x64\publish\selfcontained\*
- name: Zip ILSpy Release (arm64 framework-dependent) - name: Zip ILSpy Release (arm64 framework-dependent)
if: matrix.configuration == 'release' if: matrix.configuration == 'release'
run: > run: >
7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip
.\ILSpy\bin\Release\net10.0-windows\win-arm64\publish\fwdependent\* .\ILSpy\bin\Release\net10.0\win-arm64\publish\fwdependent\*
- name: Pack NuGets - name: Pack NuGets
if: matrix.configuration == 'release' if: matrix.configuration == 'release'
@ -157,6 +143,13 @@ jobs:
msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU" msbuild ILSpy.VSExtensions.sln /t:Restore /p:Configuration="Release" /p:Platform="Any CPU"
msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU" msbuild ILSpy.VSExtensions.sln /p:Configuration="Release" /p:Platform="Any CPU"
- name: Verify package contents
if: matrix.configuration == 'debug'
shell: pwsh
run: |
.\BuildTools\create-filelists.ps1
git diff --exit-code -- '*.filelist'
# https://github.com/actions/upload-artifact # https://github.com/actions/upload-artifact
- name: Upload VSIX (VS 2019) release build artifacts - name: Upload VSIX (VS 2019) release build artifacts
if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true' if: matrix.configuration == 'release' && env.BuildAndPublishVsix == 'true'

32
publish.ps1

@ -1,12 +1,26 @@
$output_arm64 = "./ILSpy/bin/Release/net10.0-windows/win-arm64/publish/fwdependent" #!/usr/bin/env pwsh
$output_x64 = "./ILSpy/bin/Release/net10.0-windows/win-x64/publish/fwdependent" # Publish the Windows distribution bundles. Invoked by the build workflow as:
$output_x64_selfcontained = "./ILSpy/bin/Release/net10.0-windows/win-x64/publish/selfcontained" # .\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'
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o $output_arm64 $base = "./ILSpy/bin/$Configuration/net10.0"
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --no-self-contained -r win-arm64 -o $output_arm64
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --no-self-contained -r win-x64 -o $output_x64 $output_x64 = "$base/win-x64/publish/fwdependent"
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --no-self-contained -r win-x64 -o $output_x64 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
dotnet publish ./ILSpy/ILSpy.csproj -c Release --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained if ($Configuration -eq 'Release') {
dotnet publish ./ILSpy.ReadyToRun/ILSpy.ReadyToRun.csproj -c Release --no-restore --self-contained -r win-x64 -o $output_x64_selfcontained $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
}

Loading…
Cancel
Save