File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -286,10 +286,14 @@ jobs:
286286 - name : Make source archive
287287 run : |
288288 ./contrib/release/make-archive.sh artifacts
289+ - name : Latest Changes
290+ run : |
291+ ./contrib/release/latest-changelog.awk CHANGELOG.md >latest-changes.md
289292 - name : Draft Release
290293 uses : softprops/action-gh-release@v1
291294 with :
292295 draft : true
296+ body_path : latest-changes.md
293297 fail_on_unmatched_files : true
294298 files : |
295299 artifacts/stgit-*.tar.gz
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env -S awk -f
2+
3+ # Extract the latest release notes from CHANGELOG.md.
4+ #
5+ # The h3 sections from the first h2 section are printed.
6+
7+ BEGIN {
8+ foundFirstH2 = 0
9+ foundFirstH3 = 0
10+ foundSecondH2 = 0
11+ }
12+
13+ {
14+ if (! foundFirstH2) {
15+ if ($0 ~ /^ ## /) {
16+ foundFirstH2 = 1
17+ }
18+ } else if (! foundFirstH3) {
19+ if ($0 ~ /^ ### /) {
20+ foundFirstH3 = 1
21+ print $0
22+ }
23+ } else if (! foundSecondH2) {
24+ if ($0 ~ /^ ## /) {
25+ foundSecondH2 = 1
26+ } else {
27+ print $0
28+ }
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments