fix: 修复前端构建时版本号未正确传递的问题
- 在 GitHub Actions 前端构建步骤中添加 VERSION、GIT_TAG 环境变量 - 确保版本号能正确注入到前端构建产物中
This commit is contained in:
@@ -111,11 +111,16 @@ jobs:
|
|||||||
node-version: '18'
|
node-version: '18'
|
||||||
|
|
||||||
- name: Build Frontend
|
- name: Build Frontend
|
||||||
|
env:
|
||||||
|
VERSION: ${{ steps.extract_version.outputs.VERSION }}
|
||||||
|
GIT_TAG: ${{ steps.extract_version.outputs.TAG }}
|
||||||
|
GITHUB_REPO_URL: https://github.com/WrBug/PolyHermes
|
||||||
run: |
|
run: |
|
||||||
cd frontend
|
cd frontend
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
echo "✅ 前端构建完成"
|
echo "✅ 前端构建完成"
|
||||||
|
echo "📦 版本信息: VERSION=${{ steps.extract_version.outputs.VERSION }}, GIT_TAG=${{ steps.extract_version.outputs.TAG }}"
|
||||||
du -sh dist/
|
du -sh dist/
|
||||||
|
|
||||||
# ============ 打包更新包 ============
|
# ============ 打包更新包 ============
|
||||||
|
|||||||
Reference in New Issue
Block a user