Skip to content

feat(release): auto-sync version from git tag - #94

Merged
0Chencc merged 1 commit into
mainfrom
feat/release-version-sync
Feb 6, 2026
Merged

feat(release): auto-sync version from git tag#94
0Chencc merged 1 commit into
mainfrom
feat/release-version-sync

Conversation

@0Chencc

@0Chencc 0Chencc commented Feb 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • 为 release workflow 的 4 个构建任务(Linux、Windows、macOS ARM64、macOS Intel)各添加 Sync version from tag 步骤
  • 在构建前通过 node -e 将 git tag 中的版本号自动写入 package.jsonsrc-tauri/tauri.conf.jsonsrc-tauri/Cargo.toml
  • 版本同步仅在 CI 中临时生效,不回写仓库,源码保持开发版本号

Details

当推送 v0.1.1 标签时,validate 任务提取版本号 0.1.1,各构建任务在 pnpm install 之前更新三个版本文件,确保构建产物携带正确版本。

Test plan

  • 推送新 tag(如 v0.1.1)触发 release workflow,验证各平台构建产物版本号正确
  • 验证 workflow_dispatch 手动输入 tag 同样生效

Add a "Sync version from tag" step to each platform build job that
updates package.json, src-tauri/tauri.conf.json, and src-tauri/Cargo.toml
with the version extracted from the git tag. This ensures build artifacts
carry the correct version number without requiring manual version bumps
in source files.
@0Chencc
0Chencc merged commit 3066d1e into main Feb 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant