From fc75e99bafa42338b93f719a6335052cd9ea1471 Mon Sep 17 00:00:00 2001 From: mdevans Date: Wed, 6 Nov 2024 18:58:27 +0200 Subject: [PATCH] retry overwrite with powershell --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd7215f..c11fb98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,10 +84,13 @@ jobs: - name: Overwrite Unsigned Executable if: runner.os == 'windows' + shell: pwsh # Use PowerShell Core if you want to explicitly use it run: | - if exist src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe del src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe - move src\dist\signed\Anonymizer_${{ env.version }}.exe src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe - + if (Test-Path "src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe") { + Remove-Item "src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe" + } + Move-Item -Path "src\dist\signed\Anonymizer_${{ env.version }}.exe" -Destination "src\dist\Anonymizer_${{ env.version }}\Anonymizer_${{ env.version }}.exe" + - name: Upload Artifact for ${{ matrix.os }} uses: actions/upload-artifact@v4 with: