From 985f318ac10fce34f3b2ac68a7a213a4bf3b4a11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=BA=E5=8F=A3=E3=83=AC=E3=82=A4?= Date: Wed, 8 Apr 2026 16:11:18 +0200 Subject: [PATCH 1/5] Add caching for node_modules and npm in workflow --- .github/workflows/buildpr.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index 664eb02..99a7661 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -23,9 +23,23 @@ jobs: with: node-version: 22.14.0 + - name: Restore node_modules cache + id: node_modules-cache + uses: actions/cache/restore@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + - name: Install dependencies run: npm install --force + - name: Save node_modules cache + if: steps.node_modules-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} + - name: Run lint run: npm run lint @@ -50,9 +64,30 @@ jobs: with: node-version: 22.14.0 + - name: Get npm cache directory + id: npm-cache-dir + shell: bash + run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT + + - name: Restore npm cache + id: npm-cache + uses: actions/cache/restore@v4 + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-npm- + - name: Install dependencies run: set CI=false && npm install --force + - name: Save npm cache + if: steps.npm-cache.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: ${{ steps.npm-cache-dir.outputs.dir }} + key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + - name: Build/release Electron app uses: DeadCodeGames/action-electron-builder@908b7cf133f1e9bef6d538ab50ad2f7449538cc7 with: From a0a9afa53396456d2836cc650efe6f8c94f87bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=BA=E5=8F=A3=E3=83=AC=E3=82=A4?= Date: Wed, 8 Apr 2026 16:12:59 +0200 Subject: [PATCH 2/5] Update buildpr.yml --- .github/workflows/buildpr.yml | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index 99a7661..f937e16 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -64,29 +64,22 @@ jobs: with: node-version: 22.14.0 - - name: Get npm cache directory - id: npm-cache-dir - shell: bash - run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - - - name: Restore npm cache - id: npm-cache + - name: Restore node_modules cache + id: node_modules-cache uses: actions/cache/restore@v4 with: - path: ${{ steps.npm-cache-dir.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - name: Install dependencies run: set CI=false && npm install --force - - - name: Save npm cache - if: steps.npm-cache.outputs.cache-hit != 'true' + + - name: Save node_modules cache + if: steps.node_modules-cache.outputs.cache-hit != 'true' uses: actions/cache/save@v4 with: - path: ${{ steps.npm-cache-dir.outputs.dir }} - key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} + path: node_modules + key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - name: Build/release Electron app uses: DeadCodeGames/action-electron-builder@908b7cf133f1e9bef6d538ab50ad2f7449538cc7 From eb1a96114b3112ab5fe1fd96a93dc473d21a01e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=BA=E5=8F=A3=E3=83=AC=E3=82=A4?= Date: Wed, 8 Apr 2026 16:19:28 +0200 Subject: [PATCH 3/5] Update buildpr.yml --- .github/workflows/buildpr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index f937e16..572b12f 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -31,6 +31,7 @@ jobs: key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.node_modules-cache.outputs.cache-hit != 'true' run: npm install --force - name: Save node_modules cache From ea64cbf2f5506b9ab256db50d886d7c3c8008b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=BA=E5=8F=A3=E3=83=AC=E3=82=A4?= Date: Wed, 8 Apr 2026 16:20:37 +0200 Subject: [PATCH 4/5] Update buildpr.yml --- .github/workflows/buildpr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index 572b12f..17677ff 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -73,6 +73,7 @@ jobs: key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} - name: Install dependencies + if: steps.node_modules-cache.outputs.cache-hit != 'true' run: set CI=false && npm install --force - name: Save node_modules cache From 4737289b7de1e687f5c47e0701fa2abc2366a9a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=BA=E5=8F=A3=E3=83=AC=E3=82=A4?= Date: Wed, 8 Apr 2026 16:21:42 +0200 Subject: [PATCH 5/5] Update buildpr.yml --- .github/workflows/buildpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildpr.yml b/.github/workflows/buildpr.yml index 17677ff..e358b9d 100644 --- a/.github/workflows/buildpr.yml +++ b/.github/workflows/buildpr.yml @@ -13,7 +13,7 @@ permissions: jobs: test-lint: - runs-on: ubuntu-latest + runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - name: Check out Git repository uses: actions/checkout@v1