From af17dca4e4292ac180630ae32d36e036c8f82b11 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 23 Jun 2025 04:54:32 -0500 Subject: [PATCH] fix: fix MSI rename step, raise error on missing artifacts --- .github/workflows/build.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c6a9aae..4f671c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,6 +33,7 @@ jobs: with: name: HATray-linux-amd64-${{ env.VERSION }} path: bin/HATray-linux-amd64-${{ env.VERSION }} + if-no-files-found: error build-windows: runs-on: windows-latest @@ -79,20 +80,18 @@ jobs: - name: Rename MSI with Version shell: pwsh - run: | - $msi = Get-ChildItem -Path bin -Filter "HATray-*.msi" | Select-Object -First 1 - if ($msi) { - Rename-Item -Path $msi.FullName -NewName "HATray-windows-amd64-$env:VERSION.msi" - } + run: Rename-Item -Path bin/HATray.msi -NewName "HATray-windows-amd64-$env:VERSION.msi" - name: Upload Windows Binary uses: actions/upload-artifact@v4 with: name: HATray-windows-amd64-${{ env.VERSION }}.exe path: bin/HATray-windows-amd64-${{ env.VERSION }}.exe + if-no-files-found: error - name: Upload MSI uses: actions/upload-artifact@v4 with: name: HATray-windows-amd64-${{ env.VERSION }}.msi - path: bin/HATray-windows-amd64-${{ env.VERSION }}.msi \ No newline at end of file + path: bin/HATray-windows-amd64-${{ env.VERSION }}.msi + if-no-files-found: error \ No newline at end of file