@@ -397,7 +397,7 @@ Here's some sample `RELEASING.md` documentation that goes with the automation be
397397 * Review and merge the backport pull request that it generates.
398398* Merge a pull request to the release branch updating the `CHANGELOG.md`.
399399 * The heading for the release should include the release version but not the release date, e.g.
400- ` ## Version 1.9.0 (unreleased)` .
400+ ` ## Version 1.9.1 (unreleased)` .
401401* Run the [Prepare patch release workflow](https://github.com/open-telemetry/TODO/actions/workflows/prepare-patch-release.yml).
402402 * Press the "Run workflow" button, then select the release branch from the dropdown list,
403403 e.g. `release/v1.9.x`, and click the "Run workflow" button below that.
@@ -682,14 +682,17 @@ jobs:
682682 EOF
683683 fi
684684
685- # TODO this is dependent on the conventions you follow in your CHANGELOG.md
685+ # TODO the initial sed range match is dependent on the your CHANGELOG.md format
686+
687+ # the last complex regex is needed because markdown docs render newlines as soft wraps
688+ # while release notes render them as line breaks
686689 sed -n "/^## Version $VERSION/,/^## Version /p" CHANGELOG.md \
687690 | tail -n +2 \
688691 | head -n -1 \
689692 | perl -0pe 's/^\n +//g' \
690693 | perl -0pe 's/\n +$/\n /g' \
691694 | sed -r "s,\[ #([0-9]+)]\( https://github.com/$GITHUB_REPOSITORY/(pull|issues)/[0-9]+\) ,#\1 ," \
692- | perl -0pe 's/\n + / /g' \
695+ | perl -0pe 's/(?<! \n ) \n *(?! \n )(?![-*] )(?![1-9]+ \. ) / /g' \
693696 >> release-notes.txt
694697` ` `
695698
@@ -749,8 +752,8 @@ For example to send a PR to notify/update another repository that a new release
749752as part of the release workflow.
750753
751754Note that the Personal Access Token used will need `workflow` (Update GitHub Action workflows)
752- permission since it will be updating the workflows of the origin repository when it pushes the
753- branch and workflows have been updated upstream .
755+ permission since if workflows have been updated upstream it will be updating the workflows of the
756+ origin repository when it pushes the branch .
754757
755758` ` ` yaml
756759 - uses: actions/checkout@v3
0 commit comments