diff --git a/LOTUS_RELEASE_FLOW.md b/LOTUS_RELEASE_FLOW.md index 5a307a3a5..9f71690c1 100644 --- a/LOTUS_RELEASE_FLOW.md +++ b/LOTUS_RELEASE_FLOW.md @@ -91,7 +91,7 @@ These releases are not mandatory but are highly recommended, as they may contain * Lotus Miner: releases ship on an as-needed basis with no specified cadence. (See [Why isn't Lotus Miner released more frequently?](#why-isnt-lotus-miner-released-more-frequently)) ## Release Process -The specific steps executed for Lotus software releases are captured in the [Release Issue template](https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md). +The specific steps executed for Lotus software releases are captured in the [Release Issue template](./documentation/misc/RELEASE_ISSUE_TEMPLATE.md). `[cmd/release](./cmd/release/README.md) is used to help populate the template. ## Release Candidates (RCs) diff --git a/cmd/release/main.go b/cmd/release/main.go index b55d7f000..2ffc9c59b 100644 --- a/cmd/release/main.go +++ b/cmd/release/main.go @@ -236,6 +236,8 @@ func main() { }, }, Action: func(c *cli.Context) error { + lotusReleaseCliString := strings.Join(os.Args, " ") + // Read and validate the flag values createOnGitHub := c.Bool("create-on-github") @@ -314,16 +316,17 @@ func main() { // Prepare template data data := map[string]any{ - "CreateOnGitHub": createOnGitHub, - "Type": releaseType, - "Tag": releaseVersion.String(), - "NextTag": releaseVersion.IncPatch().String(), - "Level": releaseLevel, - "NetworkUpgrade": networkUpgrade, - "NetworkUpgradeDiscussionLink": discussionLink, - "NetworkUpgradeChangelogEntryLink": changelogLink, - "RC1DateString": rc1Date, - "StableDateString": stableDate, + "ContentGeneratedWithLotusReleaseCli": true, + "LotusReleaseCliString": lotusReleaseCliString, + "Type": releaseType, + "Tag": releaseVersion.String(), + "NextTag": releaseVersion.IncPatch().String(), + "Level": releaseLevel, + "NetworkUpgrade": networkUpgrade, + "NetworkUpgradeDiscussionLink": discussionLink, + "NetworkUpgradeChangelogEntryLink": changelogLink, + "RC1DateString": rc1Date, + "StableDateString": stableDate, } // Render the issue template @@ -380,6 +383,9 @@ URL to create issue: _, _ = fmt.Fprintf(c.App.Writer, debugFormat, issueTitle, issueBody, issueURL) } else { // Set up the GitHub client + if os.Getenv("GITHUB_TOKEN") == "" { + return fmt.Errorf("GITHUB_TOKEN environment variable must be set when using --create-on-github") + } client := github.NewClient(nil).WithAuthToken(os.Getenv("GITHUB_TOKEN")) // Check if the issue already exists diff --git a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md index cf818042c..86fa7dd98 100644 --- a/documentation/misc/RELEASE_ISSUE_TEMPLATE.md +++ b/documentation/misc/RELEASE_ISSUE_TEMPLATE.md @@ -1,6 +1,10 @@ [//]: # (Below are non-visible steps intended for the issue creator) + +[//]: # (This content was generated using `{{.LotusReleaseCliString}}`.) +[//]: # (Learn more at https://github.com/filecoin-project/lotus/tree/master/cmd/release#readme.) + [//]: # (❗️ Complete the steps below as part of creating a release issue and mark them complete with an X or βœ… when done.) - + [//]: # ([ ] Start an issue with title "Lotus {{.Type}} v{{.Tag}} Release" and adjust the title for whether it's a Node or Miner release.) [//]: # ([ ] Copy in the content of https://github.com/filecoin-project/lotus/blob/master/documentation/misc/RELEASE_ISSUE_TEMPLATE.md) [//]: # ([ ] Find all the "go templating" "control" logic that is in \{\{ \}\} blocks and mimic the logic manually.) @@ -8,7 +12,7 @@ [//]: # ([ ] Apply the `tpm` label to the issue) [//]: # ([ ] Create the issue) - + [//]: # ([ ] Pin the issue on GitHub) # πŸ˜Άβ€πŸŒ« Meta @@ -170,6 +174,7 @@ - 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. +- [ ] Stage any security advisories for future publishing per [policy](https://github.com/filecoin-project/lotus/blob/master/LOTUS_RELEASE_FLOW.md#security-fix-policy). # ❀️ Contributors