This is an automated email from the ASF dual-hosted git repository.

wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git


The following commit(s) were added to refs/heads/main by this push:
     new 38c3cd0  Fix GitHub Release to include only version-specific changelog 
(#20)
38c3cd0 is described below

commit 38c3cd07bfa706378012a291baf46b6b4f55e20b
Author: 吴晟 Wu Sheng <[email protected]>
AuthorDate: Wed Mar 18 08:05:23 2026 +0800

    Fix GitHub Release to include only version-specific changelog (#20)
---
 .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

Reply via email to