From e6d1005244fb4451eb6384247c8d4ce3ab576863 Mon Sep 17 00:00:00 2001 From: Rhuan Barreto Date: Wed, 18 Mar 2026 20:36:04 +0100 Subject: [PATCH] fix: split upload release asset step for Windows/Unix compatibility The "Upload release asset" step used bash if/then syntax without specifying shell: bash, causing PowerShell parse errors on Windows. Split into platform-specific steps matching the existing pattern. --- .github/workflows/release-binaries.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 0a8a0365..ca7ad62f 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -96,13 +96,19 @@ jobs: Compress-Archive -Path "archgate.exe" -DestinationPath "${{ matrix.artifact }}.zip" Remove-Item "archgate.exe" - - name: Upload release asset + - name: Upload release asset (Unix) + if: runner.os != 'Windows' env: GH_TOKEN: ${{ github.token }} run: | TAG="${{ github.event.release.tag_name || inputs.tag }}" - if [ "${{ runner.os }}" = "Windows" ]; then - gh release upload "$TAG" "${{ matrix.artifact }}.zip" --clobber - else - gh release upload "$TAG" "${{ matrix.artifact }}.tar.gz" --clobber - fi + gh release upload "$TAG" "${{ matrix.artifact }}.tar.gz" --clobber + + - name: Upload release asset (Windows) + if: runner.os == 'Windows' + shell: pwsh + env: + GH_TOKEN: ${{ github.token }} + run: | + $tag = "${{ github.event.release.tag_name || inputs.tag }}" + gh release upload $tag "${{ matrix.artifact }}.zip" --clobber