Skip to content

Commit 66fdab5

Browse files
committed
add gh release create note
1 parent 7ed9d06 commit 66fdab5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/promote_release.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ export default class ReleasePromotion extends Session {
216216
' 3. Create the release on GitHub.\n' +
217217
' 4. Optionally, announce the release on your social networks.\n' +
218218
' 5. Tag @nodejs-social-team on #nodejs-release Slack channel.\n');
219+
220+
cli.separator();
221+
cli.info('Use the following command to create the release:');
222+
cli.separator();
223+
cli.info(
224+
'awk \'' +
225+
`/^## ${this.date.replaceAll('.', '\\.')}, Version ${this.version.replaceAll('.', '\\.')}/,` +
226+
'/^<a id="[0-9]+\\.[0-9]+\\.[0-9]+"><\\x2fa>$/{' +
227+
'print buf; if(firstLine == "") firstLine = $0; else buf = $0' +
228+
`}' doc/changelogs/CHANGELOG_V${
229+
this.versionComponents.major}.md | gh release create ${this.version} --verify-tag --latest=${
230+
!this.isLTS} --title=${JSON.stringify(this.releaseTitle)} --notes-file -`);
219231
}
220232

221233
async verifyPRAttributes() {
@@ -320,6 +332,7 @@ export default class ReleasePromotion extends Session {
320332
cli.error('Cannot find section for the new release in CHANGELOG');
321333
throw new Error('Aborted');
322334
}
335+
this.releaseTitle = headingLine[0].slice(4);
323336
const expectedLine = `+## ${releaseCommitMessage}, @${this.username}`;
324337
if (headingLine[0] !== expectedLine &&
325338
!headingLine[0].startsWith(`${expectedLine} prepared by @`)) {

0 commit comments

Comments
 (0)