fix: 使用 corepack 启用 pnpm 替代 npm install -g

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
电摇小子
2026-06-01 11:01:37 +08:00
co-authored by Claude Opus 4.7
parent 9cd6061c0f
commit ffe797b3e4
6 changed files with 31 additions and 4 deletions
+2 -2
View File
@@ -22,8 +22,8 @@ jobs:
node-version: '20' node-version: '20'
cache: 'pnpm' cache: 'pnpm'
- name: Install pnpm - name: Enable pnpm via corepack
run: npm install -g pnpm@7 run: corepack enable && corepack prepare pnpm@7 --activate
- name: Install Dependencies - name: Install Dependencies
run: pnpm install run: pnpm install
+1
View File
@@ -5,3 +5,4 @@ out
.DS_Store .DS_Store
.eslintcache .eslintcache
*.log* *.log*
.omc
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# 获取当前版本号(从 package.json 读取)
VERSION=$(jq -r '.version' package.json)
# 格式化为新的 tag(在版本号前加上 "v"
TAG="v${VERSION}"
# 输出当前生成的 tag
echo "生成的 tag: $TAG"
# 创建并推送 tag 到远程
git tag $TAG
git push origin $TAG
echo "Tag $TAG 已经推送到远程仓库!"
+9
View File
@@ -0,0 +1,9 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_DEEPSEEK_API_KEY: string
}
interface ImportMeta {
readonly env: ImportMetaEnv
}
+2 -1
View File
@@ -1,4 +1,5 @@
{ {
"files": [], "files": [],
"references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }] "references": [{ "path": "./tsconfig.node.json" }, { "path": "./tsconfig.web.json" }],
"include": ["src", "vite-env.d.ts"]
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json", "extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
"include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*", "src/shared/**/*"], "include": ["electron.vite.config.*", "src/main/**/*", "src/preload/**/*", "src/shared/**/*", "src/env.d.ts"],
"compilerOptions": { "compilerOptions": {
"composite": true, "composite": true,
"types": ["electron-vite/node"] "types": ["electron-vite/node"]