78
78
79
79
- Dates listed below as _ "YYYY-MM-DD"_ should be the date of the release ** as
80
80
UTC** . Use ` date -u +'%Y-%m-%d' ` to find out what this is.
81
- - Version strings are listed below as _ "vx.y.z"_ . Substitute for the release
82
- version.
81
+ - Version strings are listed below as _ "vx.y.z"_ or _ "x.y.z"_ . Substitute for
82
+ the release version.
83
+ - Examples will use the fictional release version ` 1.2.3 ` .
83
84
84
85
### 0. Pre-release steps
85
86
@@ -98,29 +99,54 @@ of the `nodejs-private/node-private` repository a day or so before the
98
99
[ CI lockdown procedure] [ ] begins. This is to confirm that Jenkins can properly
99
100
access the private repository.
100
101
101
- ### 1. Cherry-picking from ` master ` and other branches
102
+ ### 1. Update the staging branch
102
103
103
- Create a new branch named _ "vx.y.z-proposal"_ , or something similar. Using `git
104
- cherry-pick`, bring the appropriate commits into your new branch. To determine
105
- the relevant commits, use [ ` branch-diff ` ] ( https://github.com/rvagg/branch-diff )
106
- and [ ` changelog-maker ` ] ( https://github.com/rvagg/changelog-maker/ ) (both are
107
- available on npm and should be installed globally). These tools depend on our
108
- commit metadata, as well as the ` semver-minor ` and ` semver-major ` GitHub labels.
109
- One drawback is that when the ` PR-URL ` metadata is accidentally omitted from a
110
- commit, the commit will show up because it's unsure if it's a duplicate or not.
104
+ Checkout the staging branch locally.
111
105
112
- For a list of commits that could be landed in a patch release on v5.x:
106
+ ``` console
107
+ $ git remote update
108
+ $ git checkout v1.x-staging
109
+ $ git reset --hard upstream/v1.x-staging
110
+ ```
111
+
112
+ If the staging branch is not up to date relative to ` master ` , bring the
113
+ appropriate commits into it. To determine the relevant commits, use
114
+ [ ` branch-diff ` ] ( https://github.com/nodejs/branch-diff ) . The tool is available on
115
+ npm and should be installed globally or run with ` npx ` . It depends on our commit
116
+ metadata, as well as the GitHub labels such as ` semver-minor ` and
117
+ ` semver-major ` . One drawback is that when the ` PR-URL ` metadata is accidentally
118
+ omitted from a commit, the commit will show up because it's unsure if it's a
119
+ duplicate or not.
120
+
121
+ For a list of commits that could be landed in a patch release on v1.x:
113
122
114
123
``` console
115
- $ branch-diff v5.x master --exclude-label=semver-major,semver-minor,dont-land-on-v5 .x --filter-release --format=simple
124
+ $ 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
116
125
```
117
126
118
127
Carefully review the list of commits looking for errors (incorrect ` PR-URL ` ,
119
- incorrect semver, etc.). Commits labeled as semver minor or semver major should
120
- only be cherry-picked when appropriate for the type of release being made.
121
- Previous release commits and version bumps do not need to be cherry-picked.
128
+ incorrect semver, etc.). Commits labeled as ` semver-minor ` or ` semver-major `
129
+ should only be cherry-picked when appropriate for the type of release being
130
+ made. Previous release commits and version bumps do not need to be
131
+ cherry-picked.
132
+
133
+ If commits were cherry-picked in this step, push to the staging branch to keep
134
+ it up-to-date.
135
+
136
+ ``` console
137
+ $ git push upstream v1.x-staging
138
+ ```
139
+
140
+ ### 2. Create a new branch for the release
141
+
142
+ Create a new branch named ` vx.y.z-proposal ` , off the corresponding staging
143
+ branch.
144
+
145
+ ``` console
146
+ $ git checkout -b v1.2.3-proposal upstream/v1.x-staging
147
+ ```
122
148
123
- ### 2 . Update ` src/node_version.h `
149
+ ### 3 . Update ` src/node_version.h `
124
150
125
151
Set the version for the proposed release using the following macros, which are
126
152
already defined in ` src/node_version.h ` :
@@ -160,12 +186,12 @@ informed perspective, such as a member of the NAN team.
160
186
see a need to bump `NODE_MODULE_VERSION` then you should consult the TSC.
161
187
Commits may need to be reverted or a major version bump may need to happen.
162
188
163
- ### 3 . Update the Changelog
189
+ ### 4 . Update the Changelog
164
190
165
- #### Step 1 : Collecting the formatted list of changes:
191
+ #### Step 1 : Collect the formatted list of changes
166
192
167
193
Collect a formatted list of commits since the last release. Use
168
- [`changelog-maker`](https:// github.com/rvagg /changelog-maker) to do this:
194
+ [`changelog-maker`](https:// github.com/nodejs /changelog-maker) to do this:
169
195
170
196
```console
171
197
$ changelog-maker --group
@@ -176,12 +202,12 @@ in the repository was not on the current branch you may have to supply a
176
202
` --start-ref ` argument:
177
203
178
204
``` console
179
- $ changelog-maker --group --start-ref v2.3.1
205
+ $ changelog-maker --group --start-ref v1.2.2
180
206
```
181
207
182
208
#### Step 2: Update the appropriate doc/changelogs/CHANGELOG_ * .md file
183
209
184
- There is a separate ` CHANGELOG_* .md` file for each major Node.js release line.
210
+ There is a separate ` CHANGELOG_Vx .md` file for each major Node.js release line.
185
211
These are located in the ` doc/changelogs/ ` directory. Once the formatted list of
186
212
changes is collected, it must be added to the top of the relevant changelog file
187
213
in the release branch (e.g. a release for Node.js v4 would be added to the
@@ -210,18 +236,22 @@ The new entry should take the following form:
210
236
The release type should be either Current, LTS, or Maintenance, depending on the
211
237
type of release being produced.
212
238
239
+ You can use ` branch-diff ` to get a list of commits with the ` notable-change `
240
+ label:
241
+
242
+ ``` console
243
+ $ branch-diff upstream/v1.x v1.2.3-proposal --require-label=notable-change -format=simple
244
+ ```
245
+
213
246
Be sure that the ` <a> ` tag, as well as the two headings, are not indented at
214
247
all.
215
248
216
- At the top of each ` CHANGELOG_*.md ` file, and in the root ` CHANGELOG.md ` file,
217
- there is a table indexing all releases in each major release line. A link to the
218
- new release needs to be added to each. Follow the existing examples and be sure
219
- to add the release to the * top* of the list.
220
-
221
- In the root ` CHANGELOG.md ` file, the most recent release for each release line
222
- is shown in ** bold** in the index. When updating the index, please make sure to
223
- update the display accordingly by removing the bold styling from the previous
224
- release.
249
+ At the top of the root ` CHANGELOG.md ` file, there is a table indexing all
250
+ releases in each major release line. A link to the new release needs to be added
251
+ to it. Follow the existing examples and be sure to add the release to the * top*
252
+ of the list. The most recent release for each release line is shown in ** bold**
253
+ in the index. When updating the index, please make sure to update the display
254
+ accordingly by removing the bold styling from the previous release.
225
255
226
256
#### Step 3: Update any REPLACEME and DEP00XX tags in the docs
227
257
@@ -239,12 +269,12 @@ If this release includes any new deprecations it is necessary to ensure that
239
269
those are assigned a proper static deprecation code. These are listed in the
240
270
docs (see ` doc/api/deprecations.md ` ) and in the source as ` DEP00XX ` . The code
241
271
must be assigned a number (e.g. ` DEP0012 ` ). Note that this assignment should
242
- occur when the PR is landed, but a check will be made when the release built is
272
+ occur when the PR is landed, but a check will be made when the release build is
243
273
run.
244
274
245
- ### 4 . Create Release Commit
275
+ ### 5 . Create Release Commit
246
276
247
- The ` CHANGELOG.md ` , ` doc/changelogs/CHANGELOG_* .md ` , ` src/node_version.h ` , and
277
+ The ` CHANGELOG.md ` , ` doc/changelogs/CHANGELOG_Vx .md ` , ` src/node_version.h ` , and
248
278
` REPLACEME ` changes should be the final commit that will be tagged for the
249
279
release. When committing these to git, use the following message format:
250
280
@@ -256,38 +286,40 @@ Notable changes:
256
286
* Copy the notable changes list here, reformatted for plain-text
257
287
```
258
288
259
- ### 5 . Propose Release on GitHub
289
+ ### 6 . Propose Release on GitHub
260
290
261
291
Push the release branch to ` nodejs/node ` , not to your own fork. This allows
262
292
release branches to more easily be passed between members of the release team if
263
293
necessary.
264
294
265
295
Create a pull request targeting the correct release line. For example, a
266
- v5.3.0-proposal PR should target v5.x, not master. Paste the CHANGELOG
296
+ ` v5.3.0-proposal ` PR should target ` v5.x ` , not master. Paste the CHANGELOG
267
297
modifications into the body of the PR so that collaborators can see what is
268
298
changing. These PRs should be left open for at least 24 hours, and can be
269
299
updated as new commits land.
270
300
271
301
If you need any additional information about any of the commits, this PR is a
272
302
good place to @-mention the relevant contributors.
273
303
274
- This is also a good time to update the release commit to include ` PR-URL `
275
- metadata .
304
+ After opening the PR, update the release commit to include ` PR-URL ` metadata and
305
+ force-push the proposal .
276
306
277
- ### 6 . Ensure that the Release Branch is Stable
307
+ ### 7 . Ensure that the Release Branch is Stable
278
308
279
- Run a
280
- ** [ node-test-pull-request] ( https://ci.nodejs.org/job/node-test-pull-request/ ) **
309
+ Run a ** [ ` node-test-pull-request ` ] ( https://ci.nodejs.org/job/node-test-pull-request/ ) **
281
310
test run to ensure that the build is stable and the HEAD commit is ready for
282
311
release.
283
312
284
- Perform some smoke-testing. We have [ citgm] ( https://github.com/nodejs/citgm ) for
285
- this. You can also manually test important modules from the ecosystem. Remember
286
- that node-gyp and npm both take a ` --nodedir ` flag to point to your local
287
- repository so that you can test unreleased versions without needing node-gyp to
288
- download headers for you.
313
+ Also run a ** [ ` node-test-commit-v8-linux ` ] ( https://ci.nodejs.org/job/node-test-commit-v8-linux/ ) **
314
+ test run if the release contains changes to ` deps/v8 ` .
289
315
290
- ### 7. Produce a Nightly Build _ (optional)_
316
+ Perform some smoke-testing. There is the
317
+ ** [ ` citgm-smoker ` ] ( https://ci.nodejs.org/job/citgm-smoker/ ) ** CI job for this
318
+ purpose. Run it once with the base ` vx.x ` branch as a reference and with the
319
+ proposal branch to check if new regressions could be introduced in the
320
+ ecosystem.
321
+
322
+ ### 8. Produce a Nightly Build _ (optional)_
291
323
292
324
If there is a reason to produce a test release for the purpose of having others
293
325
try out installers or specifics of builds, produce a nightly build using
@@ -299,7 +331,7 @@ enter a proper length commit SHA, enter a date string, and select "nightly" for
299
331
This is particularly recommended if there has been recent work relating to the
300
332
macOS or Windows installers as they are not tested in any way by CI.
301
333
302
- ### 8 . Produce Release Builds
334
+ ### 9 . Produce Release Builds
303
335
304
336
Use ** [ iojs+release] ( https://ci-release.nodejs.org/job/iojs+release/ ) ** to
305
337
produce release artifacts. Enter the commit that you want to build from and
@@ -345,19 +377,19 @@ can use the
345
377
build in the release CI to re-run the build only for ARMv6. When launching the
346
378
build make sure to use the same commit hash as for the original release.
347
379
348
- ### 9 . Test the Build
380
+ ### 10 . Test the Build
349
381
350
382
Jenkins collects the artifacts from the builds, allowing you to download and
351
383
install the new build. Make sure that the build appears correct. Check the
352
384
version numbers, and perform some basic checks to confirm that all is well with
353
385
the build before moving forward.
354
386
355
- ### 10 . Tag and Sign the Release Commit
387
+ ### 11 . Tag and Sign the Release Commit
356
388
357
389
Once you have produced builds that you're happy with, create a new tag. By
358
390
waiting until this stage to create tags, you can discard a proposed release if
359
391
something goes wrong or additional commits are required. Once you have created a
360
- tag and pushed it to GitHub, you *** should not*** delete and re-tag. If you make
392
+ tag and pushed it to GitHub, you *** must not*** delete and re-tag. If you make
361
393
a mistake after tagging then you'll have to version-bump and start again and
362
394
count that tag/version as lost.
363
395
@@ -388,7 +420,7 @@ following command:
388
420
$ git push < remote> < vx.y.z>
389
421
```
390
422
391
- ### 11 . Set Up For the Next Release
423
+ ### 12 . Set Up For the Next Release
392
424
393
425
On release proposal branch, edit ` src/node_version.h ` again and:
394
426
@@ -407,17 +439,26 @@ This sets up the branch so that nightly builds are produced with the next
407
439
version number _ and_ a pre-release tag.
408
440
409
441
Merge your release proposal branch into the stable branch that you are releasing
410
- from (e.g. ` v8.x ` ), and rebase the corresponding staging branch (` v8.x-staging ` )
411
- on top of that.
442
+ from and rebase the corresponding staging branch on top of that.
443
+
444
+ ``` console
445
+ $ git checkout v1.x
446
+ $ git merge --ff-only v1.2.3-proposal
447
+ $ git push upstream v1.x
448
+ $ git checkout v1.x-staging
449
+ $ git rebase v1.x
450
+ $ git push upstream v1.x-staging
451
+ ```
412
452
413
453
Cherry-pick the release commit to ` master ` . After cherry-picking, edit
414
454
` src/node_version.h ` to ensure the version macros contain whatever values were
415
- previously on ` master ` . ` NODE_VERSION_IS_RELEASE ` should be ` 0 ` .
455
+ previously on ` master ` . ` NODE_VERSION_IS_RELEASE ` should be ` 0 ` . ** Do not**
456
+ cherry-pick the "Working on vx.y.z" commit to ` master ` .
416
457
417
458
Run ` make lint-md-build; make lint ` before pushing to ` master ` , to make sure the
418
459
Changelog formatting passes the lint rules on ` master ` .
419
460
420
- ### 12 . Promote and Sign the Release Builds
461
+ ### 13 . Promote and Sign the Release Builds
421
462
422
463
** It is important that the same individual who signed the release tag be the one
423
464
to promote the builds as the SHASUMS256.txt file needs to be signed with the
@@ -469,7 +510,7 @@ be prompted to re-sign SHASUMS256.txt.
469
510
* Note* : It is possible to only sign a release by running `./tools/release.sh -s
470
511
vX.Y.Z`.
471
512
472
- ### 13 . Check the Release
513
+ ### 14 . Check the Release
473
514
474
515
Your release should be available at ` https://nodejs.org/dist/vx.y.z/ ` and
475
516
< https://nodejs.org/dist/latest/ > . Check that the appropriate files are in
@@ -478,7 +519,7 @@ have the right internal version strings. Check that the API docs are available
478
519
at < https://nodejs.org/api/ > . Check that the release catalog files are correct
479
520
at < https://nodejs.org/dist/index.tab > and < https://nodejs.org/dist/index.json > .
480
521
481
- ### 14 . Create a Blog Post
522
+ ### 15 . Create a Blog Post
482
523
483
524
There is an automatic build that is kicked off when you promote new builds, so
484
525
within a few minutes nodejs.org will be listing your new version as the latest
@@ -512,7 +553,7 @@ This script will use the promoted builds and changelog to generate the post. Run
512
553
- Changes to ` master ` on the nodejs.org repo will trigger a new build of
513
554
nodejs.org so your changes should appear in a few minutes after pushing.
514
555
515
- ### 15 . Announce
556
+ ### 16 . Announce
516
557
517
558
The nodejs.org website will automatically rebuild and include the new version.
518
559
To announce the build on Twitter through the official @nodejs account, email
@@ -527,11 +568,19 @@ To ensure communication goes out with the timing of the blog post, please allow
527
568
will be shared with the community in the email to coordinate these
528
569
announcements.
529
570
530
- ### 16. Cleanup
571
+ ### 17. Create the release on GitHub
572
+
573
+ - Got to the [ New release page] ( https://github.com/nodejs/node/releases/new ) .
574
+ - Select the tag version you pushed earlier.
575
+ - For release title, copy the title from the changelog.
576
+ - For the description, copy the rest of the changelog entry.
577
+ - Click on the "Publish release" button.
578
+
579
+ ### 18. Cleanup
531
580
532
- Close your release proposal PR and remove the proposal branch.
581
+ Close your release proposal PR and delete the proposal branch.
533
582
534
- ### 17 . Celebrate
583
+ ### 19 . Celebrate
535
584
536
585
_ In whatever form you do this..._
537
586
0 commit comments