Skip to content

Commit 37f4bbc

Browse files
committed
chore: added an automatic release notes drafter
1 parent 026d193 commit 37f4bbc

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: '📋 Update Release Notes'
2+
3+
on:
4+
release:
5+
types:
6+
- released
7+
- edited
8+
9+
jobs:
10+
update-notes:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
17+
with:
18+
ref: master
19+
20+
- name: Extract changelog from build.yaml
21+
id: changelog
22+
run: |
23+
changelog=$(sed -n '/^changelog: |-$/,/^[^ ]/{ /^changelog: |-$/d; /^[^ ]/d; s/^ //; p; }' build.yaml)
24+
echo "body<<EOF" >> "$GITHUB_OUTPUT"
25+
echo "$changelog" >> "$GITHUB_OUTPUT"
26+
echo "EOF" >> "$GITHUB_OUTPUT"
27+
28+
- name: Update release body
29+
if: steps.changelog.outputs.body != ''
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
gh release edit "${{ github.event.release.tag_name }}" --notes "${{ steps.changelog.outputs.body }}"

0 commit comments

Comments
 (0)