diff --git a/tools/release/git/github-urls.ts b/tools/release/git/github-urls.ts index 8afd37b7e593..0c0fdbbdc83d 100644 --- a/tools/release/git/github-urls.ts +++ b/tools/release/git/github-urls.ts @@ -5,9 +5,10 @@ export function getGithubBranchCommitsUrl(owner: string, repository: string, bra /** Gets a Github URL that can be used to create a new release from a given tag. */ export function getGithubNewReleaseUrl(options: {owner: string, repository: string, - tagName: string, releaseTitle: string}) { + tagName: string, releaseTitle: string, body: string}) { return `https://github.com/${options.owner}/${options.repository}/releases/new?` + `tag=${encodeURIComponent(options.tagName)}&` + - `title=${encodeURIComponent(options.releaseTitle)}&`; + `title=${encodeURIComponent(options.releaseTitle)}&` + + `body=${encodeURIComponent(options.body)}`; } diff --git a/tools/release/publish-release.ts b/tools/release/publish-release.ts index 39b6b81cb0e1..be6a832bcac6 100644 --- a/tools/release/publish-release.ts +++ b/tools/release/publish-release.ts @@ -126,6 +126,9 @@ class PublishReleaseTask extends BaseReleaseTask { repository: this.repositoryName, tagName: newVersionName, releaseTitle: releaseTitle, + // TODO: we cannot insert the real changelog here since the URL would become + // way too large and Github would consider this as a malformed page request. + body: 'Copy-paste changelog in here!' }); console.log(); @@ -133,8 +136,11 @@ class PublishReleaseTask extends BaseReleaseTask { // Always log out of npm after releasing to prevent unintentional changes to // any packages. - npmLogout(); - console.info(green(bold(` ✓ Logged out of npm`))); + if (npmLogout()) { + console.info(green(` ✓ Logged out of npm`)); + } else { + console.error(red(` ✘ Could not log out of NPM. Please manually log out!`)); + } console.info(yellow(` ⚠ Please draft a new release of the version on Github.`)); console.info(yellow(` ${newReleaseUrl}`));