From d3e3b2c3760be8c697d850b90a85a9fdca1d8938 Mon Sep 17 00:00:00 2001 From: Haksung Jang Date: Mon, 6 Jul 2026 23:45:41 +0900 Subject: [PATCH] fix(release): strip Docusaurus front matter from GitHub Release notes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The release job fed docs-site/docs/release-notes/.md into `gh release create --notes-file` verbatim. GitHub renders the body as plain Markdown and does not recognise YAML front matter — worse, the closing `---` is parsed as the setext-heading underline of the metadata block above it, so the entire id:/title:/description:/sidebar_* block rendered as one giant H2 (visible on v0.10.0–v0.13.0). Strip the leading `--- ... ---` front matter with awk before publishing, emitting only the body after the second delimiter. --- .github/workflows/release.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 96758986..02b21866 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -329,7 +329,17 @@ jobs: NOTES_FILE="docs-site/docs/release-notes/${TAG}.md" if [ -f "$NOTES_FILE" ]; then echo "using curated release notes: $NOTES_FILE" - gh release create "$TAG" --draft --title "$TAG" --notes-file "$NOTES_FILE" + # Strip the Docusaurus YAML front matter (the leading --- ... --- + # block). GitHub renders the Release body as plain Markdown and does + # NOT recognise front matter — worse, the closing `---` is parsed as + # the setext-heading underline of the metadata block above it, so the + # whole `id:/title:/description:/...` block renders as one giant H2. + # Emit only the body after the second `---` delimiter. + BODY_FILE="${RUNNER_TEMP}/${TAG}-notes.md" + awk 'NR==1 && $0=="---" {infm=1; next} + infm && $0=="---" {infm=0; next} + !infm {print}' "$NOTES_FILE" > "$BODY_FILE" + gh release create "$TAG" --draft --title "$TAG" --notes-file "$BODY_FILE" else echo "no curated notes for $TAG — auto-generating from history" gh release create "$TAG" --draft --title "$TAG" --generate-notes