Skip to content

Commit 8bf7978

Browse files
Add rwjblue release-it config
1 parent d269231 commit 8bf7978

File tree

3 files changed

+1388
-77
lines changed

3 files changed

+1388
-77
lines changed

RELEASE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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 principle 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+
yarn install
51+
```
52+
53+
* And last (but not least 😁) do your release. It requires a
54+
[GitHub personal access token](https://github.com/settings/tokens) as
55+
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
56+
or other scopes are required.
57+
58+
```
59+
export GITHUB_AUTH="f941e0..."
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 to to choose the version number after which
65+
you will have the chance to hand tweak the changelog to be used (for the
66+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
67+
pushing the tag and commits, etc.

package.json

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,18 @@
1818
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
1919
"lint:hbs": "ember-template-lint .",
2020
"lint:js": "eslint .",
21+
"prepare": "./scripts/link-them.sh",
2122
"start": "ember serve",
2223
"test": "npm-run-all lint:* test:*",
24+
"test:browser": "ember test --test-port=0",
2325
"test:ember": "ember test",
2426
"test:ember-compatibility": "ember try:each",
25-
"test:browser": "ember test --test-port=0",
2627
"test:node": "mocha tests-node --recursive",
27-
"test:test-apps": "cd test-apps/new-addon && yarn test",
28-
"prepare": "./scripts/link-them.sh"
28+
"test:test-apps": "cd test-apps/new-addon && yarn test"
29+
},
30+
"resolutions": {
31+
"**/tough-cookie": "~2.4.0",
32+
"ember-assign-polyfill": "^2.6.0"
2933
},
3034
"dependencies": {
3135
"@glimmer/syntax": "^0.42.2",
@@ -137,15 +141,16 @@
137141
"loader.js": "^4.7.0",
138142
"mocha": "^6.2.3",
139143
"npm-run-all": "^4.1.5",
140-
"qunit-dom": "^1.1.0"
141-
},
142-
"resolutions": {
143-
"**/tough-cookie": "~2.4.0",
144-
"ember-assign-polyfill": "^2.6.0"
144+
"qunit-dom": "^1.1.0",
145+
"release-it": "^13.5.7",
146+
"release-it-lerna-changelog": "^2.3.0"
145147
},
146148
"engines": {
147149
"node": "10.* || >= 12"
148150
},
151+
"publishConfig": {
152+
"registry": "https://registry.npmjs.org"
153+
},
149154
"ember-addon": {
150155
"configPath": "tests/dummy/config",
151156
"before": [
@@ -157,5 +162,20 @@
157162
"after": [
158163
"ember-modal-dialog"
159164
]
165+
},
166+
"release-it": {
167+
"plugins": {
168+
"release-it-lerna-changelog": {
169+
"infile": "CHANGELOG.md",
170+
"launchEditor": true
171+
}
172+
},
173+
"git": {
174+
"tagName": "v${version}"
175+
},
176+
"github": {
177+
"release": true,
178+
"tokenRef": "GITHUB_AUTH"
179+
}
160180
}
161181
}

0 commit comments

Comments
 (0)