|
|
@@ -6,7 +6,7 @@ on:
|
|
|
- 'v*'
|
|
|
|
|
|
jobs:
|
|
|
- # 第一步:更新版本号并提交
|
|
|
+ # 第一步:类型检查、更新版本号并提交
|
|
|
update-version:
|
|
|
runs-on: ubuntu-latest
|
|
|
outputs:
|
|
|
@@ -20,6 +20,13 @@ jobs:
|
|
|
uses: actions/setup-node@v4
|
|
|
with:
|
|
|
node-version: '20'
|
|
|
+ cache: 'npm'
|
|
|
+
|
|
|
+ - name: Install dependencies
|
|
|
+ run: npm ci
|
|
|
+
|
|
|
+ - name: Type check
|
|
|
+ run: npm run typecheck
|
|
|
|
|
|
- name: Extract version from tag
|
|
|
id: version
|
|
|
@@ -64,12 +71,25 @@ jobs:
|
|
|
node-version: '20'
|
|
|
cache: 'npm'
|
|
|
|
|
|
+ - name: Cache Electron
|
|
|
+ uses: actions/cache@v4
|
|
|
+ with:
|
|
|
+ path: |
|
|
|
+ ~/AppData/Local/electron/Cache
|
|
|
+ ~/.cache/electron
|
|
|
+ ~/Library/Caches/electron
|
|
|
+ key: electron-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
|
|
+
|
|
|
+ - name: Cache pkg (Windows only)
|
|
|
+ if: matrix.platform == 'win'
|
|
|
+ uses: actions/cache@v4
|
|
|
+ with:
|
|
|
+ path: ~/.pkg-cache
|
|
|
+ key: pkg-cache-node18-win-x64
|
|
|
+
|
|
|
- name: Install dependencies
|
|
|
run: npm ci
|
|
|
|
|
|
- - name: Type check
|
|
|
- run: npm run typecheck
|
|
|
-
|
|
|
- name: Build frontend
|
|
|
run: npx vite build
|
|
|
|