Skip to content

Commit b0eef9e

Browse files
committed
fix: ci pnpm version
1 parent 66518fd commit b0eef9e

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

.github/workflows/build.yml

+22-12
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,33 @@ jobs:
8181
runs-on: ubuntu-latest
8282
needs: [ test, version-info ]
8383
if: ${{ needs.version-info.outputs.release == 1 || needs.version-info.outputs.dev == 1 }}
84-
strategy:
85-
matrix:
86-
node-version: [ 18 ]
8784
steps:
8885
- name: Checkout
8986
uses: actions/checkout@v4
9087

91-
- uses: pnpm/action-setup@v2
88+
- name: Install Node.js
89+
uses: actions/setup-node@v4
9290
with:
93-
version: 8
91+
node-version: 20
9492

95-
- name: Use Node.js ${{ matrix.node-version }}
96-
uses: actions/setup-node@v3
93+
- uses: pnpm/action-setup@v4
94+
name: Install pnpm
9795
with:
98-
node-version: ${{ matrix.node-version }}
99-
cache: 'pnpm'
100-
cache-dependency-path: webui/pnpm-lock.yaml
96+
version: 9
97+
run_install: false
98+
99+
- name: Get pnpm store directory
100+
shell: bash
101+
run: |
102+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
103+
104+
- uses: actions/cache@v4
105+
name: Setup pnpm cache
106+
with:
107+
path: ${{ env.STORE_PATH }}
108+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
109+
restore-keys: |
110+
${{ runner.os }}-pnpm-store-
101111
102112
- name: Install dependencies
103113
run: cd webui && pnpm install
@@ -247,7 +257,7 @@ jobs:
247257
run: |
248258
echo ${{ needs.version-info.outputs.version }}
249259
echo "VERSION='${{ needs.version-info.outputs.version }}'" >> module/__version__.py
250-
260+
251261
- name: Copy requirements.txt
252262
working-directory: ./backend
253263
run:
@@ -267,7 +277,7 @@ jobs:
267277
echo "version=🌟${{ needs.version-info.outputs.version }}" >> $GITHUB_OUTPUT
268278
echo "pre_release=false" >> $GITHUB_OUTPUT
269279
fi
270-
280+
271281
- name: Release
272282
id: release
273283
uses: softprops/action-gh-release@v1

webui/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,6 @@
6565
"vite-plugin-pwa": "^0.16.4",
6666
"vitest": "^0.30.1",
6767
"vue-tsc": "^1.6.4"
68-
}
68+
},
69+
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
6970
}

0 commit comments

Comments
 (0)