Skip to content

fix(ci): Release Notes 里的注意事项只输出一次#558

Merged
H-Chris233 merged 1 commit into
Open-Less:betafrom
andya1lan:fix/release-notes-duplicate-prelude
May 31, 2026
Merged

fix(ci): Release Notes 里的注意事项只输出一次#558
H-Chris233 merged 1 commit into
Open-Less:betafrom
andya1lan:fix/release-notes-duplicate-prelude

Conversation

@andya1lan
Copy link
Copy Markdown
Contributor

@andya1lan andya1lan commented May 30, 2026

User description

摘要

让 GitHub Release notes 的注意事项(macOS 安装提示 / 及其渠道说明 / 行为变更提示)只出现一次,不再随 matrix job 数量重复追加。
例如:v1.3.4-tauri 的 release 里这段出现了 4 次,因为 4 个 matrix job 各调一次 softprops/action-gh-release@v2 并共享同一份 body: + append_body: true

修复

  • 把 release body prelude 从内联 body: 改成 leader job(darwin/aarch64)写到 $RUNNER_TEMP/release-body.md,release step 通过 body_path 引用;其他 matrix job 的 OPENLESS_RELEASE_BODY_PATH 为空,softprops 走 body || existing.body 分支保留既有内容
  • 去掉 append_body: true,leader 用默认 append_body=false 每次完整覆盖 body,同一 tag re-run 也保持 idempotent(旧实现 re-run 一次会把上一轮 body 再拼到前面)

兼容

  • 不包含:发版 tag 命名、artifact 文件列表、generate_release_notes 的 gate 条件、Beta 渠道行为、in-app updater manifest——全部未改
  • 对现有用户 / 本地环境 / 构建流程的影响:仅影响下一个 v*-tauri tag 发版后 GitHub Release 页面的 notes 文本;in-app updater(latest-*.json 文件名 / 内容 / 推送渠道)、artifact 下载链接、本地 dev build 不受影响

测试计划

  • 命令:触发 release workflow
  • 结果:release 页面注意事项只出现一次,后面跟一份自动生成的 "What's Changed";prerelease=true 标记仍正确;4 个平台的 artifact(.dmg / .app.tar.gz / .exe / .msi / .deb / .rpm / .AppImage / latest-*.json)齐全
  • 证据路径:https://github.com/Open-Less/openless/releases/tag/vX.Y.Z-beta-tauri
  • 命令:在 Actions 页面重跑该 tag 的任一 matrix job
  • 结果:release notes body 与首次发版后完全一致,prelude 不被再次复制
  • 证据路径:同上 release 页面 + 对应 workflow run log

PR Type

Bug fix


Description

  • Write release prelude once

  • Use body_path for leader job

  • Preserve existing body on other jobs

  • Generate notes only on leader


Diagram Walkthrough

flowchart LR
  A["Leader matrix job"] -- "writes prelude file" --> B["$RUNNER_TEMP/release-body.md"]
  B -- "passed via `body_path`" --> C["softprops/action-gh-release"]
  D["Other matrix jobs"] -- "leave body path empty" --> C
  C -- "append generated notes once" --> E["GitHub Release notes"]
Loading

File Walkthrough

Relevant files
Bug fix
release-tauri.yml
Move release body to leader-only file                                       

.github/workflows/release-tauri.yml

  • Adds a leader-only step to write the release prelude into
    $RUNNER_TEMP/release-body.md.
  • Exports OPENLESS_RELEASE_BODY_PATH so only the leader job passes
    body_path to the release action.
  • Removes the inline body and append_body: true usage to avoid repeated
    prelude appends.
  • Keeps generate_release_notes on the leader job, preventing duplicate
    What's Changed sections.
+40/-27 

Copilot AI review requested due to automatic review settings May 30, 2026 16:45
@github-actions
Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ No major issues detected

@H-Chris233 H-Chris233 merged commit 8a68be0 into Open-Less:beta May 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants