Skip to content

Commit c8397c0

Browse files
authored
Add PRs with release-notes labels to the CHANGELOG (#2067)
Problem: Looking for all the PRs that have the release-notes label is a manual process Solution: As a first step in automating this process, we add the list of PRs to the top of the CHANGELOG so they can be moved in the appropriate sections
1 parent ad9e003 commit c8397c0

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

.github/release-notes.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- skip-changelog
5+
categories:
6+
- title: Changelog
7+
labels:
8+
- release-notes

.github/workflows/release-pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ permissions:
1818
jobs:
1919
release:
2020
runs-on: ubuntu-22.04
21+
permissions:
22+
contents: write
2123
steps:
2224
- name: Branch
2325
id: branch
@@ -31,6 +33,13 @@ jobs:
3133
with:
3234
ref: ${{ steps.branch.outputs.branch }}
3335

36+
- name: Get Release Notes
37+
id: notes
38+
uses: lucacome/draft-release@8a63d32c79a171ae6048e614a8988f0ac3ed56d4 # v1.1.0
39+
with:
40+
config-path: .github/release-notes.yml
41+
dry-run: true
42+
3443
- name: Vars
3544
id: vars
3645
run: |
@@ -76,6 +85,7 @@ jobs:
7685
sed -i -e "s/VERSION = edge/VERSION = ${{ inputs.version }}/g" Makefile
7786
sed -i "6r .github/CHANGELOG_TEMPLATE.md" CHANGELOG.md
7887
sed -i -e "s/%%VERSION%%/${{ inputs.version }}/g" CHANGELOG.md
88+
sed -i "8a ${{ join(fromJson(steps.notes.outputs.release-sections).release-notes, '\n') }}\n" CHANGELOG.md
7989
make generate-manifests
8090
8191
- name: Create Pull Request

0 commit comments

Comments
 (0)