1# Node.js Release Process 2 3This document describes the technical aspects of the Node.js release process. 4The intended audience is those who have been authorized by the Node.js 5Technical Steering Committee (TSC) to create, promote, and sign 6official release builds for Node.js, hosted on <https://nodejs.org/>. 7 8## Table of Contents 9 10* [Who can make a release?](#who-can-make-a-release) 11 * [1. Jenkins Release Access](#1-jenkins-release-access) 12 * [2. <nodejs.org> Access](#2-nodejsorg-access) 13 * [3. A Publicly Listed GPG Key](#3-a-publicly-listed-gpg-key) 14* [How to create a release](#how-to-create-a-release) 15 * [0. Pre-release steps](#0-pre-release-steps) 16 * [1. Update the staging branch](#1-update-the-staging-branch) 17 * [2. Create a new branch for the release](#2-create-a-new-branch-for-the-release) 18 * [3. Update `src/node_version.h`](#3-update-srcnode_versionh) 19 * [4. Update the Changelog](#4-update-the-changelog) 20 * [5. Create Release Commit](#5-create-release-commit) 21 * [6. Propose Release on GitHub](#6-propose-release-on-github) 22 * [7. Ensure that the Release Branch is Stable](#7-ensure-that-the-release-branch-is-stable) 23 * [8. Produce a Nightly Build _(optional)_](#8-produce-a-nightly-build-optional) 24 * [9. Produce Release Builds](#9-produce-release-builds) 25 * [10. Test the Build](#10-test-the-build) 26 * [11. Tag and Sign the Release Commit](#11-tag-and-sign-the-release-commit) 27 * [12. Set Up For the Next Release](#12-set-up-for-the-next-release) 28 * [13. Cherry-pick the Release Commit to `master`](#13-cherry-pick-the-release-commit-to-master) 29 * [14. Push the release tag](#14-push-the-release-tag) 30 * [15. Promote and Sign the Release Builds](#15-promote-and-sign-the-release-builds) 31 * [16. Check the Release](#16-check-the-release) 32 * [17. Create a Blog Post](#17-create-a-blog-post) 33 * [18. Create the release on GitHub](#18-create-the-release-on-github) 34 * [19. Cleanup](#19-cleanup) 35 * [20. Announce](#20-announce) 36 * [21. Celebrate](#21-celebrate) 37* [LTS Releases](#lts-releases) 38* [Major Releases](#major-releases) 39 40## Who can make a release? 41 42Release authorization is given by the Node.js TSC. Once authorized, an 43individual must have the following: 44 45### 1. Jenkins Release Access 46 47There are three relevant Jenkins jobs that should be used for a release flow: 48 49**a.** **Test runs:** 50**[node-test-pull-request](https://ci.nodejs.org/job/node-test-pull-request/)** 51is used for a final full-test run to ensure that the current *HEAD* is stable. 52 53**b.** **Nightly builds:** (optional) 54**[iojs+release](https://ci-release.nodejs.org/job/iojs+release/)** can be used 55to create a nightly release for the current *HEAD* if public test releases are 56required. Builds triggered with this job are published straight to 57<https://nodejs.org/download/nightly/> and are available for public download. 58 59**c.** **Release builds:** 60**[iojs+release](https://ci-release.nodejs.org/job/iojs+release/)** does all of 61the work to build all required release assets. Promotion of the release files is 62a manual step once they are ready (see below). 63 64The [Node.js build team](https://github.com/nodejs/build) is able to provide 65this access to individuals authorized by the TSC. 66 67### 2. <nodejs.org> Access 68 69The _dist_ user on nodejs.org controls the assets available in 70<https://nodejs.org/download/>. <https://nodejs.org/dist/> is an alias for 71<https://nodejs.org/download/release/>. 72 73The Jenkins release build workers upload their artifacts to the web server as 74the _staging_ user. The _dist_ user has access to move these assets to public 75access while, for security, the _staging_ user does not. 76 77Nightly builds are promoted automatically on the server by a cron task for the 78_dist_ user. 79 80Release builds require manual promotion by an individual with SSH access to the 81server as the _dist_ user. The 82[Node.js build team](https://github.com/nodejs/build) is able to provide this 83access to individuals authorized by the TSC. 84 85### 3. A Publicly Listed GPG Key 86 87A `SHASUMS256.txt` file is produced for every promoted build, nightly, and 88releases. Additionally for releases, this file is signed by the individual 89responsible for that release. In order to be able to verify downloaded binaries, 90the public should be able to check that the `SHASUMS256.txt` file has been 91signed by someone who has been authorized to create a release. 92 93The GPG keys should be fetchable from a known third-party keyserver. The SKS 94Keyservers at <https://sks-keyservers.net> are recommended. Use the 95[submission](https://pgp.mit.edu/) form to submit a new GPG key. You'll need to 96do an ASCII-armored export of your key first: 97 98```console 99$ gpg --armor --export email@server.com > ~/nodekey.asc 100``` 101 102Keys should be fetchable via: 103 104```console 105$ gpg --keyserver pool.sks-keyservers.net --recv-keys <FINGERPRINT> 106``` 107 108The key you use may be a child/subkey of an existing key. 109 110Additionally, full GPG key fingerprints for individuals authorized to release 111should be listed in the Node.js GitHub README.md file. 112 113## How to create a release 114 115Notes: 116 117* Dates listed below as _"YYYY-MM-DD"_ should be the date of the release **as 118 UTC**. Use `date -u +'%Y-%m-%d'` to find out what this is. 119* Version strings are listed below as _"vx.y.z"_ or _"x.y.z"_. Substitute for 120 the release version. 121* Examples will use the fictional release version `1.2.3`. 122 123### 0. Pre-release steps 124 125Before preparing a Node.js release, the Build Working Group must be notified at 126least one business day in advance of the expected release. Coordinating with 127Build is essential to make sure that the CI works, release files are published, 128and the release blog post is available on the project website. 129 130Build can be contacted best by opening up an issue on the [Build issue 131tracker][], and by posting in `#node-build` on [webchat.freenode.net][]. 132 133When preparing a security release, contact Build at least two weekdays in 134advance of the expected release. To ensure that the security patch(es) can be 135properly tested, run a `node-test-pull-request` job against the `master` branch 136of the `nodejs-private/node-private` repository a day or so before the 137[CI lockdown procedure][] begins. This is to confirm that Jenkins can properly 138access the private repository. 139 140### 1. Update the staging branch 141 142Checkout the staging branch locally. 143 144```console 145$ git remote update 146$ git checkout v1.x-staging 147$ git reset --hard upstream/v1.x-staging 148``` 149 150If the staging branch is not up to date relative to `master`, bring the 151appropriate PRs and commits into it. 152 153Go through PRs with the label `vN.x`. e.g. [PRs with the `v8.x` label](https://github.com/nodejs/node/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc+label%3Av8.x). 154 155For each PR: 156 157* Run or check that there is a passing CI. 158* Check approvals (you can approve yourself). 159* Check that the commit metadata was not changed from the `master` commit. 160* If there are merge conflicts, ask the PR author to rebase. 161Simple conflicts can be resolved when landing. 162 163When landing the PR add the `Backport-PR-URL:` line to each commit. Close the 164backport PR with `Landed in ...`. Update the label on the original PR from 165`backport-requested-vN.x` to `backported-to-vN.x`. 166 167To determine the relevant commits, use 168[`branch-diff`](https://github.com/nodejs/branch-diff). The tool is available on 169npm and should be installed globally or run with `npx`. It depends on our commit 170metadata, as well as the GitHub labels such as `semver-minor` and 171`semver-major`. One drawback is that when the `PR-URL` metadata is accidentally 172omitted from a commit, the commit will show up because it's unsure if it's a 173duplicate or not. 174 175For a list of commits that could be landed in a patch release on v1.x: 176 177```console 178$ branch-diff v1.x-staging master --exclude-label=semver-major,semver-minor,dont-land-on-v1.x,backport-requested-v1.x --filter-release --format=simple 179``` 180 181Previous release commits and version bumps do not need to be 182cherry-picked. 183 184Carefully review the list of commits: 185 186* Checking for errors (incorrect `PR-URL`) 187* Checking semver status - Commits labeled as `semver-minor` or `semver-major` 188should only be cherry-picked when appropriate for the type of release being 189made. 190* If you think it's risky so should wait for a while, add the `baking-for-lts` 191tag. 192 193When cherry-picking commits, if there are simple conflicts you can resolve 194them. Otherwise, add the `backport-requested-vN.x` label to the original PR 195and post a comment stating that it does not land cleanly and will require a 196backport PR. You can refer the owner of the PR to the "[Backporting to Release 197 Lines](https://github.com/nodejs/node/blob/master/doc/guides/backporting-to-release-lines.md)" guide. 198 199If commits were cherry-picked in this step, check that the test still pass and 200push to the staging branch to keep it up-to-date. 201 202```console 203$ git push upstream v1.x-staging 204``` 205 206### 2. Create a new branch for the release 207 208Create a new branch named `vx.y.z-proposal`, off the corresponding staging 209branch. 210 211```console 212$ git checkout -b v1.2.3-proposal upstream/v1.x-staging 213``` 214 215### 3. Update `src/node_version.h` 216 217Set the version for the proposed release using the following macros, which are 218already defined in `src/node_version.h`: 219 220```c 221#define NODE_MAJOR_VERSION x 222#define NODE_MINOR_VERSION y 223#define NODE_PATCH_VERSION z 224``` 225 226Set the `NODE_VERSION_IS_RELEASE` macro value to `1`. This causes the build to 227be produced with a version string that does not have a trailing pre-release tag: 228 229```c 230#define NODE_VERSION_IS_RELEASE 1 231``` 232 233**Also consider whether to bump `NODE_MODULE_VERSION`**: 234 235This macro is used to signal an ABI version for native addons. It currently has 236two common uses in the community: 237 238* Determining what API to work against for compiling native addons, e.g. 239 [NAN](https://github.com/nodejs/nan) uses it to form a compatibility-layer for 240 much of what it wraps. 241* Determining the ABI for downloading pre-built binaries of native addons, e.g. 242 [node-pre-gyp](https://github.com/mapbox/node-pre-gyp) uses this value as 243 exposed via `process.versions.modules` to help determine the appropriate 244 binary to download at install-time. 245 246The general rule is to bump this version when there are _breaking ABI_ changes 247and also if there are non-trivial API changes. The rules are not yet strictly 248defined, so if in doubt, please confer with someone that will have a more 249informed perspective, such as a member of the NAN team. 250 251A registry of currently used `NODE_MODULE_VERSION` values is maintained at 252<https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json>. 253When bumping `NODE_MODULE_VERSION`, you should choose a new value not listed 254in the registry. Also include a change to the registry in your commit to 255reflect the newly used value. 256 257It is current TSC policy to bump major version when ABI changes. If you 258see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC. 259Commits may need to be reverted or a major version bump may need to happen. 260 261### 4. Update the Changelog 262 263#### Step 1: Collect the formatted list of changes 264 265Collect a formatted list of commits since the last release. Use 266[`changelog-maker`](https://github.com/nodejs/changelog-maker) to do this: 267 268```console 269$ changelog-maker --group 270``` 271 272`changelog-maker` counts commits since the last tag and if the last tag 273in the repository was not on the current branch you may have to supply a 274`--start-ref` argument: 275 276```console 277$ changelog-maker --group --start-ref v1.2.2 278``` 279 280#### Step 2: Update the appropriate doc/changelogs/CHANGELOG_*.md file 281 282There is a separate `CHANGELOG_Vx.md` file for each major Node.js release line. 283These are located in the `doc/changelogs/` directory. Once the formatted list of 284changes is collected, it must be added to the top of the relevant changelog file 285in the release branch (e.g. a release for Node.js v4 would be added to the 286`/doc/changelogs/CHANGELOG_V4.md`). 287 288**Please do *not* add the changelog entries to the root `CHANGELOG.md` file.** 289 290The new entry should take the following form: 291 292```markdown 293<a id="x.y.x"></a> 294## YYYY-MM-DD, Version x.y.z (Release Type), @releaser 295 296### Notable changes 297 298* List interesting changes here 299* Particularly changes that are responsible for minor or major version bumps 300* Also be sure to look at any changes introduced by dependencies such as npm 301* ... and include any notable items from there 302 303### Commits 304 305* Include the full list of commits since the last release here. Do not include "Working on X.Y.Z+1" commits. 306``` 307 308The release type should be either Current, LTS, or Maintenance, depending on the 309type of release being produced. 310 311You can use `branch-diff` to get a list of commits with the `notable-change` 312label: 313 314```console 315$ branch-diff upstream/v1.x v1.2.3-proposal --require-label=notable-change -format=simple 316``` 317 318Be sure that the `<a>` tag, as well as the two headings, are not indented at 319all. 320 321At the top of the root `CHANGELOG.md` file, there is a table indexing all 322releases in each major release line. A link to the new release needs to be added 323to it. Follow the existing examples and be sure to add the release to the *top* 324of the list. The most recent release for each release line is shown in **bold** 325in the index. When updating the index, please make sure to update the display 326accordingly by removing the bold styling from the previous release. 327 328#### Step 3: Update any REPLACEME and DEP00XX tags in the docs 329 330If this release includes new APIs then it is necessary to document that they 331were first added in this version. The relevant commits should already include 332`REPLACEME` tags as per the example in the 333[docs README](../../tools/doc/README.md). Check for these tags with `grep 334REPLACEME doc/api/*.md`, and substitute this node version with `sed -i 335"s/REPLACEME/$VERSION/g" doc/api/*.md` or `perl -pi -e "s/REPLACEME/$VERSION/g" 336doc/api/*.md`. 337 338`$VERSION` should be prefixed with a `v`. 339 340If this release includes any new deprecations it is necessary to ensure that 341those are assigned a proper static deprecation code. These are listed in the 342docs (see `doc/api/deprecations.md`) and in the source as `DEP00XX`. The code 343must be assigned a number (e.g. `DEP0012`). This assignment should 344occur when the PR is landed, but a check will be made when the release build is 345run. 346 347### 5. Create Release Commit 348 349The `CHANGELOG.md`, `doc/changelogs/CHANGELOG_Vx.md`, `src/node_version.h`, and 350`REPLACEME` changes should be the final commit that will be tagged for the 351release. When committing these to git, use the following message format: 352 353```text 354YYYY-MM-DD, Version x.y.z (Release Type) 355 356Notable changes: 357 358* Copy the notable changes list here, reformatted for plain-text 359``` 360 361For security releases, begin the commit message with the phrase 362`This is a security release.` to allow the 363[distribution indexer](https://github.com/nodejs/nodejs-dist-indexer) to 364identify it as such: 365 366```text 367YYYY-MM-DD, Version x.y.z (Release Type) 368 369This is a security release. 370 371Notable changes: 372 373* Copy the notable changes list here, reformatted for plain-text 374``` 375 376### 6. Propose Release on GitHub 377 378Push the release branch to `nodejs/node`, not to your own fork. This allows 379release branches to more easily be passed between members of the release team if 380necessary. 381 382Create a pull request targeting the correct release line. For example, a 383`v5.3.0-proposal` PR should target `v5.x`, not master. Paste the CHANGELOG 384modifications into the body of the PR so that collaborators can see what is 385changing. These PRs should be left open for at least 24 hours, and can be 386updated as new commits land. 387 388If you need any additional information about any of the commits, this PR is a 389good place to @-mention the relevant contributors. 390 391After opening the PR, update the release commit to include `PR-URL` metadata and 392force-push the proposal. 393 394### 7. Ensure that the Release Branch is Stable 395 396Run a **[`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/)** 397test run to ensure that the build is stable and the HEAD commit is ready for 398release. 399 400Also run a **[`node-test-commit-v8-linux`](https://ci.nodejs.org/job/node-test-commit-v8-linux/)** 401test run if the release contains changes to `deps/v8`. 402 403Perform some smoke-testing. There is the 404**[`citgm-smoker`](https://ci.nodejs.org/job/citgm-smoker/)** CI job for this 405purpose. Run it once with the base `vx.x` branch as a reference and with the 406proposal branch to check if new regressions could be introduced in the 407ecosystem. 408 409### 8. Produce a Nightly Build _(optional)_ 410 411If there is a reason to produce a test release for the purpose of having others 412try out installers or specifics of builds, produce a nightly build using 413**[iojs+release](https://ci-release.nodejs.org/job/iojs+release/)** and wait for 414it to drop in <https://nodejs.org/download/nightly/>. Follow the directions and 415enter a proper length commit SHA, enter a date string, and select "nightly" for 416"disttype". 417 418This is particularly recommended if there has been recent work relating to the 419macOS or Windows installers as they are not tested in any way by CI. 420 421### 9. Produce Release Builds 422 423Use **[iojs+release](https://ci-release.nodejs.org/job/iojs+release/)** to 424produce release artifacts. Enter the commit that you want to build from and 425select "release" for "disttype". 426 427Artifacts from each worker are uploaded to Jenkins and are available if further 428testing is required. Use this opportunity particularly to test macOS and Windows 429installers if there are any concerns. Click through to the individual workers 430for a run to find the artifacts. 431 432All release workers should achieve "SUCCESS" (and be green, not red). A release 433with failures should not be promoted as there are likely problems to be 434investigated. 435 436You can rebuild the release as many times as you need prior to promoting them if 437you encounter problems. 438 439If you have an error on Windows and need to start again, be aware that you'll 440get immediate failure unless you wait up to 2 minutes for the linker to stop 441from previous jobs. i.e. if a build fails after having started compiling, that 442worker will still have a linker process that's running for another couple of 443minutes which will prevent Jenkins from clearing the workspace to start a new 444one. This isn't a big deal, it's just a hassle because it'll result in another 445failed build if you start again! 446 447ARMv7 takes the longest to compile. Unfortunately ccache isn't as effective on 448release builds, I think it's because of the additional macro settings that go in 449to a release build that nullify previous builds. Also most of the release build 450machines are separate to the test build machines so they don't get any benefit 451from ongoing compiles between releases. You can expect 1.5 hours for the ARMv7 452builder to complete and you should normally wait for this to finish. It is 453possible to rush a release out if you want and add additional builds later but 454we normally provide ARMv7 from initial promotion. 455 456You do not have to wait for the ARMv6 / Raspberry PI builds if they take longer 457than the others. It is only necessary to have the main Linux (x64 and x86), 458macOS .pkg and .tar.gz, Windows (x64 and x86) .msi and .exe, source, headers, 459and docs (both produced currently by an macOS worker). **If you promote builds 460_before_ ARM builds have finished, you must repeat the promotion step for the 461ARM builds when they are ready**. If the ARMv6 build failed for some reason you 462can use the 463[`iojs-release-arm6-only`](https://ci-release.nodejs.org/job/iojs+release-arm6-only/) 464build in the release CI to re-run the build only for ARMv6. When launching the 465build make sure to use the same commit hash as for the original release. 466 467### 10. Test the Build 468 469Jenkins collects the artifacts from the builds, allowing you to download and 470install the new build. Make sure that the build appears correct. Check the 471version numbers, and perform some basic checks to confirm that all is well with 472the build before moving forward. 473 474### 11. Tag and Sign the Release Commit 475 476Once you have produced builds that you're happy with, create a new tag. By 477waiting until this stage to create tags, you can discard a proposed release if 478something goes wrong or additional commits are required. Once you have created a 479tag and pushed it to GitHub, you ***must not*** delete and re-tag. If you make 480a mistake after tagging then you'll have to version-bump and start again and 481count that tag/version as lost. 482 483Tag summaries have a predictable format, look at a recent tag to see, `git tag 484-v v6.0.0`. The message should look something like `2016-04-26 Node.js v6.0.0 485(Current) Release`. 486 487Install `git-secure-tag` npm module: 488 489```console 490$ npm install -g git-secure-tag 491``` 492 493Create a tag using the following command: 494 495```console 496$ git secure-tag <vx.y.z> <commit-sha> -sm "YYYY-MM-DD Node.js vx.y.z (<release-type>) Release" 497``` 498 499`release-type` is either "Current" or "LTS". For LTS releases, you should also 500 include the release codename, for example: 501 502```text 5032019-10-22 Node.js v10.17.0 'Dubnium' (LTS) Release 504``` 505 506The tag **must** be signed using the GPG key that's listed for you on the 507project README. 508 509### 12. Set Up For the Next Release 510 511On release proposal branch, edit `src/node_version.h` again and: 512 513* Increment `NODE_PATCH_VERSION` by one 514* Change `NODE_VERSION_IS_RELEASE` back to `0` 515 516Commit this change with the following commit message format: 517 518```text 519Working on vx.y.z # where 'z' is the incremented patch number 520 521PR-URL: <full URL to your release proposal PR> 522``` 523 524This sets up the branch so that nightly builds are produced with the next 525version number _and_ a pre-release tag. 526 527Merge your release proposal branch into the stable branch that you are releasing 528from and rebase the corresponding staging branch on top of that. 529 530```console 531$ git checkout v1.x 532$ git merge --ff-only v1.2.3-proposal 533$ git push upstream v1.x 534$ git checkout v1.x-staging 535$ git rebase v1.x 536$ git push upstream v1.x-staging 537``` 538 539### 13. Cherry-pick the Release Commit to `master` 540 541```console 542$ git checkout master 543$ git cherry-pick v1.x^ 544``` 545 546Git should stop to let you fix conflicts. Revert all changes that were made to 547`src/node_version.h`. If there are conflicts in `doc` due to updated `REPLACEME` 548placeholders (that happens when a change previously landed on another release 549branch), keep both version numbers. Convert the YAML field to an array if it is 550not already one. 551 552Then finish cherry-picking and push the commit upstream: 553 554```console 555$ git add src/node_version.h doc 556$ git cherry-pick --continue 557$ make lint 558$ git push upstream master 559``` 560 561**Do not** cherry-pick the "Working on vx.y.z" commit to `master`. 562 563### 14. Push the release tag 564 565Push the tag to the repo before you promote the builds. If you haven't pushed 566your tag first, then build promotion won't work properly. Push the tag using the 567following command: 568 569```console 570$ git push <remote> <vx.y.z> 571``` 572 573*Note*: Please do not push the tag unless you are ready to complete the 574remainder of the release steps. 575 576### 15. Promote and Sign the Release Builds 577 578**The same individual who signed the release tag must be the one 579to promote the builds as the `SHASUMS256.txt` file needs to be signed with the 580same GPG key!** 581 582Use `tools/release.sh` to promote and sign the build. Before doing this, you'll 583need to ensure you've loaded the correct ssh key, or you'll see the following: 584 585```console 586# Checking for releases ... 587Enter passphrase for key '/Users/<user>/.ssh/id_rsa': 588dist@direct.nodejs.org's password: 589``` 590 591The key can be loaded either with `ssh-add`: 592 593```console 594# Substitute node_id_rsa with whatever you've named the key 595$ ssh-add ~/.ssh/node_id_rsa 596``` 597 598or at runtime with: 599 600```console 601# Substitute node_id_rsa with whatever you've named the key 602$ ./tools/release.sh -i ~/.ssh/node_id_rsa 603``` 604 605`tools/release.sh` will perform the following actions when run: 606 607<details> 608 609**a.** Select a GPG key from your private keys. It will use a command similar 610to: `gpg --list-secret-keys` to list your keys. If you don't have any keys, it 611will bail. If you have only one key, it will use that. If you have more than 612one key it will ask you to select one from the list. Be sure to use the same 613key that you signed your git tag with. 614 615**b.** Log in to the server via SSH and check for releases that can be promoted, 616along with the list of artifacts. It will use the `dist-promotable` command on 617the server to find these. You will be asked, for each promotable release, 618whether you want to proceed. If there is more than one release to promote (there 619shouldn't be), be sure to only promote the release you are responsible for. 620 621**c.** Log in to the server via SSH and run the promote script for the given 622release. The command on the server will be similar to: `dist-promote vx.y.z`. 623After this step, the release artifacts will be available for download and a 624`SHASUMS256.txt` file will be present. The release will still be unsigned, 625however. 626 627**d.** Use `scp` to download `SHASUMS256.txt` to a temporary directory on your 628computer. 629 630**e.** Sign the `SHASUMS256.txt` file using a command similar to: `gpg 631--default-key YOURKEY --digest-algo SHA256 --clearsign /path/to/SHASUMS256.txt`. 632You will be prompted by GPG for your password. The signed file will be named 633SHASUMS256.txt.asc. 634 635**f.** Output an ASCII armored version of your public GPG key using a command 636similar to: `gpg --default-key YOURKEY --digest-algo SHA256 --detach-sign /path/to/SHASUMS256.txt`. 637You will be prompted by GPG for your password. The signed file will be named 638SHASUMS256.txt.sig. 639 640**g.** Upload the `SHASUMS256.txt` files back to the server into the release 641directory. 642</details> 643 644If you didn't wait for ARM builds in the previous step before promoting the 645release, you should re-run `tools/release.sh` after the ARM builds have 646finished. That will move the ARM artifacts into the correct location. You will 647be prompted to re-sign `SHASUMS256.txt`. 648 649**It is possible to only sign a release by running `./tools/release.sh -s 650vX.Y.Z`.** 651 652### 16. Check the Release 653 654Your release should be available at `https://nodejs.org/dist/vx.y.z/` and 655<https://nodejs.org/dist/latest/>. Check that the appropriate files are in 656place. You may want to check that the binaries are working as appropriate and 657have the right internal version strings. Check that the API docs are available 658at <https://nodejs.org/api/>. Check that the release catalog files are correct 659at <https://nodejs.org/dist/index.tab> and <https://nodejs.org/dist/index.json>. 660 661### 17. Create a Blog Post 662 663There is an automatic build that is kicked off when you promote new builds, so 664within a few minutes nodejs.org will be listing your new version as the latest 665release. However, the blog post is not yet fully automatic. 666 667Create a new blog post by running the [nodejs.org release-post.js script][]. 668This script will use the promoted builds and changelog to generate the post. Run 669`npm run serve` to preview the post locally before pushing to the 670[nodejs.org repository][]. 671 672* You can add a short blurb just under the main heading if you want to say 673 something important, otherwise the text should be publication ready. 674* The links to the download files won't be complete unless you waited for the 675 ARMv6 builds. Any downloads that are missing will have `*Coming soon*` next to 676 them. It's your responsibility to manually update these later when you have 677 the outstanding builds. 678* The `SHASUMS256.txt.asc` content is at the bottom of the post. When you update 679 the list of tarballs you'll need to copy/paste the new contents of this file 680 to reflect those changes. 681* Always use pull-requests on the [nodejs.org repository][]. Be respectful 682 of the website team, but you do not have to wait for PR sign-off. Please 683 use the following commit message format: 684 685 ```console 686 Blog: vX.Y.Z release post 687 688 Refs: <full URL to your release proposal PR> 689 ``` 690 691* Changes to `master` on the [nodejs.org repository][] will trigger a new build 692 of nodejs.org so your changes should appear a few minutes after pushing. 693 694### 18. Create the release on GitHub 695 696* Go to the [New release page](https://github.com/nodejs/node/releases/new). 697* Select the tag version you pushed earlier. 698* For release title, copy the title from the changelog. 699* For the description, copy the rest of the changelog entry. 700* Click on the "Publish release" button. 701 702### 19. Cleanup 703 704Close your release proposal PR and delete the proposal branch. 705 706### 20. Announce 707 708The nodejs.org website will automatically rebuild and include the new version. 709To announce the build on Twitter through the official @nodejs account, email 710[pr@nodejs.org](mailto:pr@nodejs.org) with a message such as: 711 712> v5.8.0 of @nodejs is out: <https://nodejs.org/en/blog/release/v5.8.0/> 713> … 714> something here about notable changes 715 716To ensure communication goes out with the timing of the blog post, please allow 71724 hour prior notice. If known, please include the date and time the release 718will be shared with the community in the email to coordinate these 719announcements. 720 721Ping the IRC ops and the other [Partner Communities][] liaisons. 722 723### 21. Celebrate 724 725_In whatever form you do this..._ 726 727## LTS Releases 728 729### Marking a Release Line as LTS 730 731To mark a release line as LTS, the following changes must be made to 732`src/node_version.h`: 733 734* The `NODE_MINOR_VERSION` macro must be incremented by one 735* The `NODE_PATCH_VERSION` macro must be set to `0` 736* The `NODE_VERSION_IS_LTS` macro must be set to `1` 737* The `NODE_VERSION_LTS_CODENAME` macro must be set to the codename selected 738for the LTS release. 739 740For example: 741 742```diff 743-#define NODE_MINOR_VERSION 12 744-#define NODE_PATCH_VERSION 1 745+#define NODE_MINOR_VERSION 13 746+#define NODE_PATCH_VERSION 0 747 748-#define NODE_VERSION_IS_LTS 0 749-#define NODE_VERSION_LTS_CODENAME "" 750+#define NODE_VERSION_IS_LTS 1 751+#define NODE_VERSION_LTS_CODENAME "Erbium" 752 753-#define NODE_VERSION_IS_RELEASE 0 754+#define NODE_VERSION_IS_RELEASE 1 755``` 756 757The changes must be made as part of a new semver-minor release. 758 759### Update release labels 760 761The `lts-watch-vN.x` issue label must be created, with the same color as other 762existing labels for that release line, such as `vN.x`. 763 764If the release is transitioning from Active LTS to Maintenance, the 765`backport-requested-vN.x` label must be deleted. 766 767## Major Releases 768 769The process for cutting a new Node.js major release has a number of differences 770from cutting a minor or patch release. 771 772### Schedule 773 774New Node.js Major releases happen twice per year: 775 776* Even-numbered releases are cut in April. 777* Odd-numbered releases are cut in October. 778 779Major releases should be targeted for the third Tuesday of the release month. 780 781A major release must not slip beyond the release month. In other words, major 782releases must not slip into May or November. 783 784The release date for the next major release should be announced immediately 785following the current release (e.g. the release date for 13.0.0 should be 786announced immediately following the release of 12.0.0). 787 788### Release Branch 789 790Approximately three months before a major release, new `vN.x` and 791`vN.x-staging` branches (where `N` indicates the major release) should be 792created as forks of the `master` branch. Up until one month before the release 793date, these must be kept in sync with `master` and must not be considered to 794be stable branches (e.g. they may be force pushed). 795 796The `vN.x` and `vN.x-staging` branches must be kept in sync with one another 797up until the date of release. 798 799One month or less before the release date, commits must be cherry-picked into 800the two branches. To land `SEMVER-MAJOR` at this time requires no objections 801from the TSC. 802 803### Create release labels 804 805The following issue labels must be created: 806 807* `vN.x` 808* `backport-blocked-vN.x` 809* `backport-open-vN.x` 810* `backport-requested-vN.x` 811* `backported-to-vN.x` 812* `dont-land-on-vN.x` 813 814The label description can be copied from existing labels of previous releases. 815The label color must be the same for all new labels, but different from the 816labels of previous releases. 817 818### Release Proposal 819 820A draft release proposal should be created two months before the release. A 821separate `vN.x-proposal` branch should be created that tracks the `vN.x` 822branch. This branch will contain the draft release commit (with the draft 823changelog). 824 825Notify the `@nodejs/npm` team in the release proposal PR to inform them of the 826upcoming release. `npm` maintains a list of [supported versions](https://github.com/npm/cli/blob/latest/lib/utils/unsupported.js#L3) 827that will need updating to include the new major release. 828 829### Test Releases and Release Candidates 830 831Test builds should be generated from the `vN.x-proposal` branch starting at 832about 6 weeks before the release. 833 834Release Candidates should be generated from the `vN.x-proposal` branch starting 835at about 4 weeks before the release, with a target of one release candidate 836per week. 837 838Always run test releases and release candidates through the Canary in the 839Goldmine tool for additional testing. 840 841### Changelogs 842 843Generating major release changelogs is a bit more involved than minor and patch 844changelogs. 845 846#### Create the changelog file 847 848In the `doc/changelogs` directory, create a new `CHANGELOG_V{N}.md` file where 849`{N}` is the major version of the release. Follow the structure of the existing 850`CHANGELOG_V*.md` files. 851 852The navigation headers in all of the `CHANGELOG_V*.md` files must be 853updated to account for the new `CHANGELOG_V{N}.md` file. 854 855Once the file is created, the root `CHANGELOG.md` file must be updated to 856reference the newly-created major release `CHANGELOG_V{N}.md`. 857 858#### Generate the changelog 859 860To generate a proper major release changelog, use the `branch-diff` tool to 861compare the `vN.x` branch against the `vN-1.x` branch (e.g. for Node.js 12.0, 862we compare the `v12.x` branch against the up to date `v11.x` branch). Make sure 863that the local copy of the downlevel branch is up to date. 864 865The commits in the generated changelog must then be organized: 866 867* Remove all release commits from the list 868* Remove all reverted commits and their reverts 869* Separate all SEMVER-MAJOR, SEMVER-MINOR, and SEMVER-PATCH commits into lists 870 871#### Generate the notable changes 872 873For a major release, all SEMVER-MAJOR commits that are not strictly internal, 874test, or doc-related are to be listed as notable changes. Some SEMVER-MINOR 875commits may be listed as notable changes on a case-by-case basis. Use your 876judgment there. 877 878[Build issue tracker]: https://github.com/nodejs/build/issues/new 879[CI lockdown procedure]: https://github.com/nodejs/build/blob/master/doc/jenkins-guide.md#restricting-access-for-security-releases 880[Partner Communities]: https://github.com/nodejs/community-committee/blob/master/governance/PARTNER_COMMUNITIES.md 881[nodejs.org release-post.js script]: https://github.com/nodejs/nodejs.org/blob/master/scripts/release-post.js 882[nodejs.org repository]: https://github.com/nodejs/nodejs.org 883[webchat.freenode.net]: https://webchat.freenode.net/ 884