release: v1.1.3 — 在 Windows CI 上建置發行檔 - #5
Merged
Conversation
The three published files were only ever produced by running build-release.ps1 on someone's machine. This tags a version and has a Windows runner do it instead, from the same script, so a release built by CI and one built by hand cannot drift apart. Guards, because a bad release is expensive to retract: - The tag, build-release.ps1, the csproj and the .iss must all agree on the version, checked before the build rather than after publishing. - All three expected artifact filenames must exist before anything is published — the installer step warns and continues when Inno Setup is missing, so a release could otherwise ship without its Setup.exe. Inno Setup is installed on the runner for the same reason. - Notes come from .github/release-notes/<tag>.md, so the published text is reviewed alongside the code it describes. - Pre-release is a per-release decision: a tag suffix, or a marker in the notes file. Not hardcoded, so later versions publish normally. v1.1.3 is marked pre-release deliberately. It carries the memory and CPU pass, which reworks hardware-read paths CI cannot exercise: the runner has no battery, no discrete GPU and no GPU Engine counters. It should be promoted to latest only after someone confirms it on real hardware. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KqeMPekXsH3e1tSgJkWYyz
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.
目的
三個發行檔先前只能靠人在自己的機器上跑
build-release.ps1產生。這個 PR 把版號升到 1.1.3,並讓 Windows runner 用同一支腳本去建置,因此 CI 產出的發行檔與手動產出的不會有落差。版號 1.1.2 → 1.1.3
同步更新,四處必須一致:
WinBatLens.csproj(含AssemblyVersion/FileVersion)、build-release.ps1、installer/WinBatLens.iss、README.md。新增
.github/workflows/release.yml推送
v*tag 時觸發,在windows-latest上:安裝 .NET 10 與 Inno Setup 6 → 跑build-release.ps1→ 上傳 workflow artifact → 建立 GitHub Release 並附上三個檔案。發行一旦出錯就很難收回,所以加了四道保護:
build-release.ps1、csproj、.iss四者不一致就直接失敗,而不是等到發行後才發現檔名對不上。build-release.ps1在找不到 Inno Setup 時只會Write-Warning然後繼續,那會發出一個少了Setup.exe的 release。因此 runner 上明確安裝 Inno Setup,並在發行前逐一驗證檔案存在。.github/release-notes/<tag>.md,讓公開的文案跟它描述的程式碼在同一個 PR 裡被審閱。v1.2.0-rc1),或說明檔裡有<!-- prerelease -->標記。沒有寫死,因此之後的正常版號會正常發行。v1.1.3 為什麼標記為預發行版
它帶的是上一個 PR 的記憶體與 CPU 最佳化,動到的是硬體讀取路徑(電池 IOCTL、GPU 效能計數器解析、感測器節奏)。CI 已通過建置(含
-warnaserror)、單元測試與單檔發行封裝,但 runner 沒有電池、沒有獨立顯示卡,也沒有 GPU Engine 效能計數器,所以下列四項尚未驗證:實機確認無誤後,在 GitHub 上把它從 pre-release 提升為 latest 即可。
合併後
合併這個 PR 後推送
v1.1.3tag,release workflow 就會自動建置並發行。🤖 Generated with Claude Code
https://claude.ai/code/session_01KqeMPekXsH3e1tSgJkWYyz
Generated by Claude Code