diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index a6a8b49d267a30420e0dd08868742b3837613e83..526ac6999f9b56eef1c7940ab06cf59a19f46d9a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -213,10 +213,10 @@ jobs:
             ${{ steps.build.outputs.installer }}
 
       - name: Upload executable
+        if: steps.build.outputs.viewer_exe
         uses: actions/upload-artifact@v3
         with:
           name: "${{ steps.build.outputs.artifact }}-exe"
-          if: steps.build.outputs.viewer_exe
           path: ${{ steps.build.outputs.viewer_exe }}
 
       # The other upload of nontrivial size is the symbol file. Use a distinct