Skip to content

リリースノートが 4 つ重複生成されるのを修正#54

Merged
TwoSquirrels merged 1 commit into
mainfrom
fix/release-notes-duplication
Jul 12, 2026
Merged

リリースノートが 4 つ重複生成されるのを修正#54
TwoSquirrels merged 1 commit into
mainfrom
fix/release-notes-duplication

Conversation

@TwoSquirrels

@TwoSquirrels TwoSquirrels commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Fix #52

原因

binaries ジョブの matrix (4 target) がそれぞれ softprops/action-gh-releasegenerate_release_notes: true 付きで呼んでいたため、既存リリースへのノート追記がジョブの数だけ発生していました (Issue のコメントの推測どおり、アセットの数 = matrix の数だけ重複)。

変更内容

  • リリースの作成とノート生成を、専用の release ジョブ (publish の後・binaries の前) で 1 回だけ行うようにした
  • matrix 側の各ジョブは gh release upload によるアセットのアップロードのみに変更 (softprops/action-gh-release への依存を削除。gh CLI は全 runner に同梱)
  • 部分失敗後の re-run 対策として、リリース作成は既存チェック付き、アップロードは --clobber 付き

留意点

  • 従来と異なり、リリース (ノート付き) はバイナリのビルド完了前に公開され、アセットは数分遅れてぶら下がります。crates.io への publish 成功後なのでリリース自体は確定しており、許容としました。
  • workflow はタグ push でしか走らないため、実地検証は次のリリース時になります (YAML 構文と gh の引数は確認済み)。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Release Process
    • Improved release automation to create each GitHub release only once.
    • Release assets are uploaded after the release is available.
    • Re-running a release safely replaces existing assets with the same name.

Each of the four binary matrix jobs invoked action-gh-release with
generate_release_notes: true, so the generated notes were appended once
per job (#52). A dedicated release job now creates the release with
notes exactly once via the preinstalled gh CLI, and the matrix jobs
only upload their asset. The view-before-create guard and --clobber
keep re-runs after a partial failure working.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92070d1a-670b-4a7f-a06d-3fb38f5dceb9

📥 Commits

Reviewing files that changed from the base of the PR and between 07e9b44 and 403d0fe.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

The release workflow now creates a tagged GitHub release once in a dedicated job, then uploads platform binaries in a dependent job using the GitHub CLI with asset replacement enabled.

Changes

Release workflow

Layer / File(s) Summary
Release creation and binary upload sequencing
.github/workflows/release.yml
A dedicated job creates or reuses the release and generates notes, while the binaries job waits for it and uploads assets with gh release upload --clobber.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly states the main fix: duplicate release notes generated four times.
Linked Issues check ✅ Passed The workflow change matches issue #52 by generating the GitHub release notes once and uploading assets separately.
Out of Scope Changes check ✅ Passed The changes stay focused on release creation and asset upload, with no obvious unrelated additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/release-notes-duplication

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TwoSquirrels TwoSquirrels merged commit 1f0607f into main Jul 12, 2026
10 checks passed
@TwoSquirrels TwoSquirrels deleted the fix/release-notes-duplication branch July 12, 2026 15:12
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.

GitHub のリリースノートが何故か 4 つ生成される

1 participant