Skip to content

Commit 72f03fa

Browse files
avalleteclaude
andauthored
chore(ci): plumb semantic-release notes into GitHub Release body (#5317)
Stage A (#prior PR) added @semantic-release/release-notes-generator to the plugin chain and a manual backfill workflow to validate the format. This change wires the same notes into the production release pipeline so future releases on develop/main come with a populated GH Release body instead of an empty page. - release.yml: capture new_release_notes from the plan job's cycjimmy/semantic-release-action step into a release_notes job output using a heredoc with a random delimiter. SR_NOTES is passed via env and emitted with printf (not echo) so attacker-influenced commit bodies / PR titles can't be interpolated as shell. The workflow_dispatch re-cut path skips semantic-release entirely, so release_notes is the empty string in that case - the operator can follow up with the backfill-release-notes workflow to populate the body afterwards. - release-shared.yml: new optional release_notes workflow_call input, wired as the body of the softprops/action-gh-release step that creates the draft release. No generate_release_notes: true - the action appends GitHub's auto notes to any supplied body, which would duplicate content. ## What kind of change does this PR introduce? Bug fix, feature, docs update, ... ## What is the current behavior? Please link any relevant issues here. ## What is the new behavior? Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots. --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 848fe45 commit 72f03fa

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/backfill-release-notes.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
name: Backfill release notes
22

33
on:
4+
workflow_call:
5+
inputs:
6+
tag:
7+
description: Release tag to refresh (e.g. v2.100.1)
8+
required: true
9+
type: string
10+
apply:
11+
description: Update the GitHub release body (otherwise dry-run only)
12+
required: false
13+
type: boolean
14+
default: false
15+
non_blocking:
16+
description: Do not fail the workflow run when backfill fails (release pipeline)
17+
required: false
18+
type: boolean
19+
default: false
420
workflow_dispatch:
521
inputs:
622
tag:
@@ -19,6 +35,7 @@ permissions:
1935
jobs:
2036
backfill:
2137
runs-on: ubuntu-latest
38+
continue-on-error: ${{ inputs.non_blocking }}
2239
permissions:
2340
contents: write
2441
env:

.github/workflows/release-shared.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,17 @@ jobs:
332332
GH_TOKEN: ${{ github.token }}
333333
run: gh release edit "v${VERSION}" --draft=false
334334

335+
# Changelog backfill only needs tag + published GH release (from publish).
336+
# Runs in parallel with brew/scoop/smoke; must not gate distribution.
337+
backfill-release-notes:
338+
uses: ./.github/workflows/backfill-release-notes.yml
339+
needs: publish
340+
if: ${{ !inputs.dry_run && needs.publish.result == 'success' }}
341+
with:
342+
tag: v${{ inputs.version }}
343+
apply: true
344+
non_blocking: true
345+
335346
publish-homebrew:
336347
needs: publish
337348
if: ${{ !inputs.dry_run && inputs.publish_brew_scoop }}

0 commit comments

Comments
 (0)