Skip to content

Commit 6073445

Browse files
author
Robert Jackson
committed
Add automated release setup.
1 parent e68934d commit 6073445

File tree

3 files changed

+1123
-69
lines changed

3 files changed

+1123
-69
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: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@
55
"keywords": [
66
"ember-addon"
77
],
8+
"homepage": "https://github.com/ember-cli/ember-resolver#readme",
9+
"bugs": {
10+
"url": "https://github.com/ember-cli/ember-resolver/issues"
11+
},
12+
"repository": {
13+
"type": "git",
14+
"url": "git+https://github.com/ember-cli/ember-resolver.git"
15+
},
816
"license": "MIT",
917
"author": "Robert Jackson <[email protected]>",
18+
"main": "index.js",
1019
"directories": {
1120
"doc": "doc",
1221
"test": "tests"
1322
},
14-
"repository": {
15-
"type": "git",
16-
"url": "git+https://github.com/ember-cli/ember-resolver.git"
17-
},
1823
"scripts": {
1924
"build": "ember build",
2025
"changelog": "lerna-changelog",
@@ -51,20 +56,33 @@
5156
"eslint-plugin-node": "^10.0.0",
5257
"lerna-changelog": "^0.8.3",
5358
"loader.js": "^4.7.0",
54-
"qunit-dom": "^0.9.0"
59+
"qunit-dom": "^0.9.0",
60+
"release-it": "^12.2.1",
61+
"release-it-lerna-changelog": "^1.0.3"
62+
},
63+
"resolutions": {
64+
"**/engine.io": "3.3.1"
5565
},
5666
"engines": {
5767
"node": "8.* || >= 10.*"
5868
},
69+
"publishConfig": {
70+
"registry": "https://registry.npmjs.org"
71+
},
5972
"ember-addon": {
6073
"configPath": "tests/dummy/config"
6174
},
62-
"main": "index.js",
63-
"bugs": {
64-
"url": "https://github.com/ember-cli/ember-resolver/issues"
65-
},
66-
"homepage": "https://github.com/ember-cli/ember-resolver#readme",
67-
"resolutions": {
68-
"**/engine.io": "3.3.1"
75+
"release-it": {
76+
"plugins": {
77+
"release-it-lerna-changelog": {
78+
"infile": "CHANGELOG.md"
79+
}
80+
},
81+
"git": {
82+
"tagName": "v${version}"
83+
},
84+
"github": {
85+
"release": true
86+
}
6987
}
7088
}

0 commit comments

Comments
 (0)