feat(release): auto-sync version from git tag - #94
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
node -e将 git tag 中的版本号自动写入package.json、src-tauri/tauri.conf.json、src-tauri/Cargo.tomlDetails
当推送
v0.1.1标签时,validate 任务提取版本号0.1.1,各构建任务在pnpm install之前更新三个版本文件,确保构建产物携带正确版本。Test plan
v0.1.1)触发 release workflow,验证各平台构建产物版本号正确workflow_dispatch手动输入 tag 同样生效