From 4cd543d482629eff7be8f83c835beb73efa2ccca Mon Sep 17 00:00:00 2001 From: Nik Rozman Date: Mon, 21 Apr 2025 23:31:38 +0200 Subject: [PATCH] Try fix CI --- .github/workflows/build_prepare.yaml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_prepare.yaml b/.github/workflows/build_prepare.yaml index ab81c37..10e675f 100644 --- a/.github/workflows/build_prepare.yaml +++ b/.github/workflows/build_prepare.yaml @@ -1,4 +1,4 @@ -# This action helps perform common actions before the build_* actions are started in parallel. +name: Prepare Build on: workflow_call: inputs: @@ -31,6 +31,11 @@ jobs: with: node-version-file: .node-version + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libnss3-dev + - name: Install Yarn run: npm install -g yarn @@ -48,10 +53,17 @@ jobs: - name: Generate cache hash files run: | - yarn run --silent electron --no-sandbox --version > electronVersion - cat package.json | jq -c .hakDependencies | sha1sum > hakHash - find hak -type f -print0 | xargs -0 sha1sum >> hakHash - find scripts/hak -type f -print0 | xargs -0 sha1sum >> hakHash + # Save electron version + NODE_ENV=production node -e "console.log(require('./package.json').devDependencies.electron)" > electronVersion + + # Generate hak dependencies hash + jq -c .hakDependencies package.json | sha1sum > hakHash + if [ -d "hak" ]; then + find hak -type f -print0 | sort -z | xargs -0 sha1sum >> hakHash + fi + if [ -d "scripts/hak" ]; then + find scripts/hak -type f -print0 | sort -z | xargs -0 sha1sum >> hakHash + fi - uses: actions/upload-artifact@v4 with: