ci: avoid duplicating release notes on existing releases#3919
Open
locker95 wants to merge 1 commit into
Open
Conversation
softprops/action-gh-release appends newly generated notes to any existing release body. Maintainers typically create the GitHub Release (with auto-generated notes) before this workflow uploads binaries, so generate_release_notes: true was duplicating What's Changed sections. Only request note generation when the release does not already have a body; otherwise just attach the built artifacts. Fixes google#3901 Signed-off-by: Dean Chen <862469039@qq.com>
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.
Problem
Several cAdvisor GitHub releases contain duplicated release notes (e.g.
What's Changed, PR list,Full Changelogappear twice):Root cause
The
Release Binariesworkflow usessoftprops/action-gh-releasewithgenerate_release_notes: true.That action appends freshly generated notes to any existing release body. Maintainers typically create the GitHub Release (with auto-generated notes, author = maintainer) before this workflow finishes building and uploads binaries. The create-release job then finds the existing release and regenerates notes, producing a duplicate body.
Timeline for
v0.60.5(same pattern on other tags):create-releasejob runs later (~05:18) and softprops appends notes againgithub-actions[bot]Fix
Before calling softprops, check whether the release already has a body:
generate_release_notes: false(only attach artifacts)generate_release_notes: true(generate notes once)Test
Workflow YAML only; verified against release timeline and softprops update path (
prepareReleaseMutationconcatenates generated notes onto an existing body).Fixes #3901