@@ -154,16 +154,19 @@ jobs:
154154
155155 - name : Assemble release notes
156156 id : release_notes
157+ env :
158+ PR_BODY : ${{ github.event.pull_request.body }}
157159 run : |
158160 changelog=$(git cliff --unreleased --bump --latest --strip all)
159161 # strip off first line (which is the version number)
160162 changelog=$(printf "%s" "$changelog" | sed '1d')
161163
162164 # Get custom notes from the PR body
163- custom_notes="${{ github.event.pull_request.body }}"
164- echo $custom_notes
165+ custom_notes="$PR_BODY"
166+ # Fix line endings
167+ custom_notes=$(printf "%s" "$custom_notes" | tr -d '\r')
165168 # Keep only the part after the first '---' line
166- custom_notes=$(printf "%s" " $custom_notes" | awk '/^---$/ {found=1; next} found && !/^---$/ {print} ')
169+ custom_notes=$(echo " $custom_notes" | sed -n '/^---$/,$p' | sed '1d ')
167170 # Strip leading / trailing whitespace
168171 custom_notes=$(printf "%s" "$custom_notes" | sed 's/^[ \t]*//;s/[ \t]*$//')
169172
@@ -175,15 +178,12 @@ jobs:
175178 fi
176179 printf "## Changes\n%s\n" "$changelog" >> /tmp/notes.md
177180
178- cat /tmp/notes.md
179-
180181 echo "release_note_file=/tmp/notes.md" >> $GITHUB_OUTPUT
181182
182183 - name : Create new release
183184 run : |
184185 gh release create "${{ steps.get_version.outputs.new_version }}" \
185186 --title "${{ steps.get_version.outputs.new_version }}" \
186187 --notes-file "${{ steps.release_notes.outputs.release_note_file }}" \
187- --draft \
188188 --target ${{ github.event.pull_request.merge_commit_sha }} \
189189 --latest
0 commit comments