This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch fix/release-changelog-extraction in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
commit 0fdcc181ad631d60ce8a2ba63de3d67d5b3a479f Author: Wu Sheng <[email protected]> AuthorDate: Tue Mar 17 22:39:02 2026 +0800 Fix GitHub Release to include only version-specific changelog --- .github/workflows/ci.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1879cc3..332c0f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -483,14 +483,19 @@ jobs: - name: Read changelog id: changelog run: | - # Use version-specific changelog if exists, otherwise default changes.md VERSION="${{ needs.init-skywalking.outputs.version }}" - if [[ -f "changes/${VERSION}.md" ]]; then - BODY_FILE="changes/${VERSION}.md" - else - BODY_FILE="changes/changes.md" - fi - echo "body-file=${BODY_FILE}" >> "$GITHUB_OUTPUT" + # Extract only the section for this version from changes.md + # (from "## {version}" up to the next "## " heading or EOF) + found=false + while IFS= read -r line; do + if [[ "${line}" == "## ${VERSION}" ]]; then + found=true + elif [[ "${line}" == "## "* ]] && $found; then + break + fi + $found && echo "${line}" + done < changes/changes.md > /tmp/release-notes.md + echo "body-file=/tmp/release-notes.md" >> "$GITHUB_OUTPUT" - name: Upload to GitHub Release uses: softprops/action-gh-release@v2
