Skip to content

release: v1.1.3 — 在 Windows CI 上建置發行檔 - #5

Merged
nojackno2-ctrl merged 1 commit into
mainfrom
claude/memory-cpu-optimization-p0z5ve
Aug 4, 2026
Merged

release: v1.1.3 — 在 Windows CI 上建置發行檔#5
nojackno2-ctrl merged 1 commit into
mainfrom
claude/memory-cpu-optimization-p0z5ve

Conversation

@nojackno2-ctrl

Copy link
Copy Markdown
Owner

目的

三個發行檔先前只能靠人在自己的機器上跑 build-release.ps1 產生。這個 PR 把版號升到 1.1.3,並讓 Windows runner 用同一支腳本去建置,因此 CI 產出的發行檔與手動產出的不會有落差。

版號 1.1.2 → 1.1.3

同步更新,四處必須一致:WinBatLens.csproj(含 AssemblyVersionFileVersion)、build-release.ps1installer/WinBatLens.issREADME.md

新增 .github/workflows/release.yml

推送 v* tag 時觸發,在 windows-latest 上:安裝 .NET 10 與 Inno Setup 6 → 跑 build-release.ps1 → 上傳 workflow artifact → 建立 GitHub Release 並附上三個檔案。

發行一旦出錯就很難收回,所以加了四道保護:

  1. 版號一致性在建置前檢查:tag、build-release.ps1、csproj、.iss 四者不一致就直接失敗,而不是等到發行後才發現檔名對不上。
  2. 三個檔案都必須存在才發行build-release.ps1 在找不到 Inno Setup 時只會 Write-Warning 然後繼續,那會發出一個少了 Setup.exe 的 release。因此 runner 上明確安裝 Inno Setup,並在發行前逐一驗證檔案存在。
  3. 發行說明來自 .github/release-notes/<tag>.md,讓公開的文案跟它描述的程式碼在同一個 PR 裡被審閱。
  4. 預發行與否是每次發行各自決定:tag 帶後綴(v1.2.0-rc1),或說明檔裡有 <!-- prerelease --> 標記。沒有寫死,因此之後的正常版號會正常發行。

v1.1.3 為什麼標記為預發行版

它帶的是上一個 PR 的記憶體與 CPU 最佳化,動到的是硬體讀取路徑(電池 IOCTL、GPU 效能計數器解析、感測器節奏)。CI 已通過建置(含 -warnaserror)、單元測試與單檔發行封裝,但 runner 沒有電池、沒有獨立顯示卡,也沒有 GPU Engine 效能計數器,所以下列四項尚未驗證:

  1. 獨顯負載百分比是否仍隨負載變動。
  2. 電池電壓、溫度與充放電瓦數是否仍讀得到。
  3. 縮到系統匣再還原後,獨顯瓦數是否立即恢復每秒更新。
  4. 波形圖三條線是否正常繪製。

實機確認無誤後,在 GitHub 上把它從 pre-release 提升為 latest 即可。

合併後

合併這個 PR 後推送 v1.1.3 tag,release workflow 就會自動建置並發行。

🤖 Generated with Claude Code

https://claude.ai/code/session_01KqeMPekXsH3e1tSgJkWYyz


Generated by Claude Code

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
@nojackno2-ctrl
nojackno2-ctrl merged commit fa44762 into main Aug 4, 2026
2 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.

2 participants