From 5fe3e636ca59675efffa97fbcaadde9f0517c392 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 10 Jun 2026 00:30:21 +0200 Subject: [PATCH] Fix Windows binaries zip: quote 7z exclusion and pin pwsh shell In pwsh the bare '-xr!*.pdb' 7z argument is split into two tokens, '-xr!*' (which excludes everything) and a bogus '.pdb' source, so the Release binaries zip added 0 files and the step failed. Quote the exclusion so it reaches 7z as one token, and pin the job's run shell to pwsh via defaults so no step silently inherits a different default shell. Assisted-by: Claude:claude-opus-4-8:Claude Code --- .github/workflows/build-ilspy.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 68e0db4a8..3cf646374 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -23,6 +23,10 @@ jobs: StagingDirectory: buildartifacts BuildAndPublishVsix: true + defaults: + run: + shell: pwsh + steps: - run: mkdir -p $env:StagingDirectory @@ -60,7 +64,6 @@ jobs: - name: Get Version id: version - shell: pwsh run: | .\BuildTools\ghactions-install.ps1 Get-ChildItem Env: | Where-Object {$_.Name -Match "^ILSPY_"} | %{ echo "$($_.Name)=$($_.Value)" } | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append @@ -103,24 +106,23 @@ jobs: folded: true - name: Publish x64/arm64 framework-dependent/self-contained - shell: pwsh run: .\publish.ps1 -Configuration ${{ matrix.configuration }} - name: Zip ILSpy (framework-dependent) run: > - 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip ${{ matrix.configuration == 'release' && '-xr!*.pdb' || '' }} + 7z a -tzip $env:StagingDirectory\ILSpy_binaries.zip ${{ matrix.configuration == 'release' && '''-xr!*.pdb''' || '' }} .\ILSpy\bin\${{ matrix.configuration }}\net10.0\win-x64\publish\fwdependent\* - name: Zip ILSpy Release (x64 self-contained) if: matrix.configuration == 'release' run: > - 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip -xr!*.pdb + 7z a -tzip $env:StagingDirectory\ILSpy_selfcontained_x64.zip '-xr!*.pdb' .\ILSpy\bin\Release\net10.0\win-x64\publish\selfcontained\* - name: Zip ILSpy Release (arm64 framework-dependent) if: matrix.configuration == 'release' run: > - 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip -xr!*.pdb + 7z a -tzip $env:StagingDirectory\ILSpy_binaries_arm64.zip '-xr!*.pdb' .\ILSpy\bin\Release\net10.0\win-arm64\publish\fwdependent\* - name: Pack NuGets @@ -145,7 +147,6 @@ jobs: - name: Verify package contents if: matrix.configuration == 'debug' - shell: pwsh run: | .\BuildTools\create-filelists.ps1 git diff --exit-code