diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index dc266327..81ebf51e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -10,7 +10,7 @@ concurrency:
 
 jobs:
   build:
-    runs-on: windows-latest
+    runs-on: windows-2022
 
     strategy:
       matrix:
@@ -46,7 +46,7 @@ jobs:
     - name: List changed files
       run: git status -u --porcelain
     - name: Hash build materials
-      run: bash -c "tar -cf /tmp/edge-js-build-materials $(find . -type f -regextype posix-egrep -regex '^\.\/((((src)|(lib\/bootstrap))\/.*)|(((binding\.gyp)|(EdgeJs\.sln))))$') && shasum -a 1 /tmp/build-materials >> lib/native/last-native-module-build-materials.txt"
+      run: bash --login -eo pipefail "tar -cf /tmp/edge-js-build-materials $(find . -type f -regextype posix-egrep -regex '^\.\/((((src)|(lib\/bootstrap))\/.*)|(((binding\.gyp)|(EdgeJs\.sln))))$') && shasum -a 1 /tmp/build-materials >> lib/native/last-native-module-build-materials.txt"
     - name: Check if build materials changed
       run: git diff --exit-code lib\native\last-native-module-build-materials.txt && echo "BUILD_MATERIALS_CHANGED=true" | Out-File -FilePath $Env:GITHUB_ENV -Append
     - name: Upload working directory as artifact