Repository navigation
ci(release): bind builds to one source identity - #187
Open
squarepots wants to merge 3 commits into
Open
squarepots wants to merge 3 commits into
squarepots wants to merge 3 commits into
Conversation
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.
本 PR 让每次 release 都从准确的现有版本 tag 构建,并在任何构建开始前确认 checkout source 与版本一致。
workflow_dispatch只接受现有版本 tag;tag push 使用触发 workflow 的 tag。scripts/verify-release-source.mjs会将 annotated 或 lightweight tag 解析到 commit,要求 checkout 的HEAD与该 commit 完全一致,并核对package.json、Tauri 配置、Cargo manifest 和 Cargo lock 中的版本。Tauri release 名称、tag 名称和 updater metadata 使用同一个已验证 tag;手动恢复只能重新发布该现有 tag,不会从无关的当前main构建历史版本。验证
pnpm test:release-source:2 个 focused tests 通过pnpm build:TypeScript 编译和 Vite production build 通过git diff --check:通过Closes #163
This PR builds every release from an exact existing version tag and verifies that the checked-out source matches that version before any build begins.
workflow_dispatchaccepts only an existing version tag, while a tag push uses the tag that triggered the workflow.scripts/verify-release-source.mjsresolves annotated or lightweight tags to commits, requires the checked-outHEADto equal that commit, and checks the versions inpackage.json, the Tauri configuration, Cargo manifest, and Cargo lock. The Tauri release name, tag name, and updater metadata all use the verified tag. Manual recovery can only republish that existing tag and cannot build a historical version from unrelated currentmainsource.Validation
pnpm test:release-source: 2 focused tests passedpnpm build: TypeScript compilation and the Vite production build passedgit diff --check: passedCloses #163
Restores #174 after the source fork was accidentally deleted.