diff --git a/cmd/release/main.go b/cmd/release/main.go index 896692d303f..96ed2f67f70 100644 --- a/cmd/release/main.go +++ b/cmd/release/main.go @@ -346,12 +346,15 @@ func main() { issueBody := issueBodyBuffer.String() // Remove duplicate newlines before headers and list items since the templating leaves a lot extra newlines around. - // Extra newlines are present because go formatting control statements done within HTML comments rather than using {{- -}}. + // Extra newlines are present because go formatting control statements are done within HTML comments rather than using {{- -}}. // HTML comments are used instead so that the template file parses as clean markdown on its own. // In addition, HTML comments were also required within "ranges" in the template. // Using HTML comments everywhere keeps things consistent. - re := regexp.MustCompile(`\n\n+([^#*\[\|])`) - issueBody = re.ReplaceAllString(issueBody, "\n$1") + // The one exception is after `` tags. In that case we preserve the newlines, + // as without newlines the section doesn't do markdown formatting on GitHub. + // Since Go regexp doesn't support negative lookbehind, we just look for any non ">". + re := regexp.MustCompile(`([^>])\n\n+([^#*\[\|])`) + issueBody = re.ReplaceAllString(issueBody, "$1\n$2") if !createOnGitHub { // Create the URL-encoded parameters diff --git a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md index 86fa7dd98b7..3ae8f30c943 100644 --- a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md +++ b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md @@ -49,7 +49,7 @@ # ✅ Release Checklist ## ⬅️ Before RC1 -
+
Section @@ -123,7 +123,6 @@ #### Release PR for {{$rc}} - - [ ] Update the version string(s) in `build/version.go` to one {{if contains "rc" $rc}}ending with '-{{$rc}}'{{else}}**NOT* ending with 'rcX'{{end}}. - Ensure to update `NodeBuildVersion` @@ -159,21 +158,23 @@ - Link to issue comment: #### Testing for {{$rc}} + > [!NOTE] > Link to any special steps for testing releases beyond ensuring CI is green. Steps can be inlined here or tracked elsewhere. -
+ ## ➡ Post-Release
- Section + Section - [ ] Open a PR against `master` cherry-picking the CHANGELOG commits from the `release/v{{.Tag}}` branch. Title it `chore(release): cherry-pick v{{.Tag}} changelog back to master` - Link to PR: - Assuming we followed [the process of merging changes into `master` first before backporting to the release branch](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#branch-and-tag-strategy), the only changes should be CHANGELOG updates. - [ ] Finish updating/merging the [RELEASE_ISSUE_TEMPLATE.md](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md) PR from `Before RC1` with any improvements determined from this latest release iteration. - [ ] Review and approve the auto-generated PR in [lotus-docs](https://github.com/filecoin-project/lotus-docs/pulls) that updates the latest Lotus version information. +- [ ] Review and approve the auto-generated PR in [homebrew-lotus](https://github.com/filecoin-project/homebrew-lotus/pulls) that updates the homebrew to the latest Lotus version. - [ ] Stage any security advisories for future publishing per [policy](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#security-fix-policy).