File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,22 @@ jobs:
4545 in_changelog=0
4646 release_notes=""
4747 while IFS= read -r line; do
48+ # Start capturing lines after the changelog header
4849 if [[ "$line" == "$changelog_section_start" ]]; then
4950 in_changelog=1
5051 continue
5152 fi
5253
53- if [[ $in_changelog -eq 1 && "$line" =~ ^== ]]; then
54- break
54+ # Stop if another version header is encountered
55+ if [[ $in_changelog -eq 1 && "$line" =~ ^=[[:space:]] ]]; then
56+ if [[ "$line" != "=${plugin_version} ="* ]]; then
57+ break
58+ fi
5559 fi
5660
61+ # Append the relevant lines for the latest changelog
5762 if [[ $in_changelog -eq 1 && -n "$line" ]]; then
58- release_notes+="$line\n"
63+ release_notes+="${ line} \n"
5964 fi
6065 done < "$readme_file"
6166
@@ -64,10 +69,11 @@ jobs:
6469 exit 1
6570 fi
6671
67- # Use the <<EOF syntax to handle multi- line environment variables correctly
72+ # Write the release notes with actual line breaks
6873 echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
69- printf "%s\n" "$release_notes" >> $GITHUB_ENV
74+ echo -e "$release_notes" >> $GITHUB_ENV
7075 echo "EOF" >> $GITHUB_ENV
76+
7177
7278 - name : Create zip file
7379 run : |
You can’t perform that action at this time.
0 commit comments