Skip to content

Commit 2e261c4

Browse files
author
Robert Jackson
authored
Add automated release setup. (#243)
Add automated release setup.
2 parents cf0f451 + 6349fcc commit 2e261c4

File tree

3 files changed

+1324
-39
lines changed

3 files changed

+1324
-39
lines changed

RELEASE.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Release
2+
3+
Releases are mostly automated using
4+
[release-it](https://github.com/release-it/release-it/) and
5+
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
6+
7+
8+
## Preparation
9+
10+
Since the majority of the actual release process is automated, the primary
11+
remaining task prior to releasing is confirming that all pull requests that
12+
have been merged since the last release have been labeled with the appropriate
13+
`lerna-changelog` labels and the titles have been updated to ensure they
14+
represent something that would make sense to our users. Some great information
15+
on why this is important can be found at
16+
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
17+
guiding principles here is that changelogs are for humans, not machines.
18+
19+
When reviewing merged PR's the labels to be used are:
20+
21+
* breaking - Used when the PR is considered a breaking change.
22+
* enhancement - Used when the PR adds a new feature or enhancement.
23+
* bug - Used when the PR fixes a bug included in a previous release.
24+
* documentation - Used when the PR adds or updates documentation.
25+
* internal - Used for internal changes that still require a mention in the
26+
changelog/release notes.
27+
28+
29+
## Release
30+
31+
Once the prep work is completed, the actual release is straight forward:
32+
33+
* First ensure that you have `release-it` installed globally, generally done by
34+
using one of the following commands:
35+
36+
```
37+
# using https://volta.sh
38+
volta install release-it
39+
40+
# using Yarn
41+
yarn global add release-it
42+
43+
# using npm
44+
npm install --global release-it
45+
```
46+
47+
* Second, ensure that you have installed your projects dependencies:
48+
49+
```
50+
# using yarn
51+
yarn install
52+
53+
# using npm
54+
npm install
55+
```
56+
57+
* And last (but not least 😁) do your release:
58+
59+
```
60+
release-it
61+
```
62+
63+
[release-it](https://github.com/release-it/release-it/) manages the actual
64+
release process. It will prompt you through the process of choosing the version
65+
number, tagging, pushing the tag and commits, etc.

package.json

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22
"name": "fastboot",
33
"version": "2.0.1",
44
"description": "Library for rendering Ember apps in node.js",
5+
"keywords": [
6+
"ember",
7+
"fastboot"
8+
],
9+
"homepage": "https://github.com/ember-fastboot/fastboot#readme",
10+
"bugs": {
11+
"url": "https://github.com/ember-fastboot/fastboot/issues"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "git+https://github.com/ember-fastboot/fastboot.git"
16+
},
17+
"license": "MIT",
18+
"author": "Tom Dale and FastBoot contributors",
519
"main": "src/index.js",
620
"scripts": {
721
"changelog": "lerna-changelog",
@@ -10,23 +24,6 @@
1024
"preversion": "npm test",
1125
"postversion": "git push origin master --tags"
1226
},
13-
"repository": {
14-
"type": "git",
15-
"url": "git+https://github.com/ember-fastboot/fastboot.git"
16-
},
17-
"engines": {
18-
"node": "^8.10.0 || 10.* || >=12"
19-
},
20-
"keywords": [
21-
"ember",
22-
"fastboot"
23-
],
24-
"author": "Tom Dale and FastBoot contributors",
25-
"license": "MIT",
26-
"bugs": {
27-
"url": "https://github.com/ember-fastboot/fastboot/issues"
28-
},
29-
"homepage": "https://github.com/ember-fastboot/fastboot#readme",
3027
"dependencies": {
3128
"chalk": "^2.4.2",
3229
"cookie": "^0.4.0",
@@ -50,7 +47,28 @@
5047
"lerna-changelog": "^0.8.2",
5148
"mocha": "^6.2.2",
5249
"prettier": "^1.18.2",
50+
"release-it": "^12.2.1",
51+
"release-it-lerna-changelog": "^1.0.3",
5352
"rimraf": "^3.0.0",
5453
"temp": "^0.9.0"
54+
},
55+
"engines": {
56+
"node": "^8.10.0 || 10.* || >=12"
57+
},
58+
"publishConfig": {
59+
"registry": "https://registry.npmjs.org"
60+
},
61+
"release-it": {
62+
"plugins": {
63+
"release-it-lerna-changelog": {
64+
"infile": "CHANGELOG.md"
65+
}
66+
},
67+
"git": {
68+
"tagName": "v${version}"
69+
},
70+
"github": {
71+
"release": true
72+
}
5573
}
5674
}

0 commit comments

Comments
 (0)