diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3728ec..3422ee5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -328,6 +328,32 @@ jobs: exit 1 fi + - name: Extract release notes + if: github.ref_type == 'tag' + run: | + mkdir -p release-notes + awk -v heading="## [$GITHUB_REF_NAME]" ' + index($0, heading) == 1 { found = 1; next } + found && (/^## / || /^\[[^]]+\]: /) { exit } + found + ' docs/CHANGELOG.md > release-notes/notes.md + if ! grep -q '[^[:space:]]' release-notes/notes.md; then + echo "docs/CHANGELOG.md has no '## [$GITHUB_REF_NAME]' section" >&2 + exit 1 + fi + cat >> release-notes/notes.md <