Skip to content
This repository was archived by the owner on Nov 25, 2025. It is now read-only.

Commit d85248a

Browse files
zsioclaude
andcommitted
feat: 添加版本管理和更新检查功能
- 实现版本检查 API,自动从 GitHub Release 获取最新版本 - 在 header 添加版本更新提示图标,有新版本时显示 - 修改构建流程,在 Docker 镜像构建时自动注入版本号 - 添加 GitHub Issues 反馈入口到导航菜单 - 开发环境自动使用 package.json 版本号 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 63c5880 commit d85248a

File tree

11 files changed

+513
-4
lines changed

11 files changed

+513
-4
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ jobs:
104104
labels: ${{ steps.meta-tag.outputs.labels }}
105105
cache-from: type=gha
106106
cache-to: type=gha,mode=max
107+
build-args: |
108+
APP_VERSION=${{ github.ref_name }}
109+
GITHUB_OWNER=${{ github.repository_owner }}
110+
GITHUB_REPO=${{ github.event.repository.name }}
107111
108112
- name: 📦 Image pushed successfully
109113
run: |

deploy/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,18 @@ RUN --mount=type=cache,target=/root/.local/share/pnpm/store pnpm install --froze
1212

1313
FROM deps AS build
1414
COPY . .
15+
16+
# 接收构建参数
17+
ARG APP_VERSION=dev
18+
ARG GITHUB_OWNER
19+
ARG GITHUB_REPO
20+
21+
# 设置为环境变量供 Next.js 使用
1522
ENV NEXT_TELEMETRY_DISABLED=1
23+
ENV NEXT_PUBLIC_APP_VERSION=$APP_VERSION
24+
ENV NEXT_PUBLIC_GITHUB_OWNER=$GITHUB_OWNER
25+
ENV NEXT_PUBLIC_GITHUB_REPO=$GITHUB_REPO
26+
1627
RUN pnpm run build
1728

1829
FROM node:22-slim AS runner

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@radix-ui/react-slider": "^1.3.6",
2525
"@radix-ui/react-slot": "^1.2.3",
2626
"@radix-ui/react-switch": "^1.2.6",
27+
"@radix-ui/react-tooltip": "^1.2.8",
2728
"@tanstack/react-query": "^5.90.2",
2829
"class-variance-authority": "^0.7.1",
2930
"clsx": "^2.1.1",

pnpm-lock.yaml

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)