Skip to content

Commit b9e1d98

Browse files
committed
Use release-it instead of ember-cli-release
1 parent 88d6144 commit b9e1d98

File tree

5 files changed

+2023
-1124
lines changed

5 files changed

+2023
-1124
lines changed

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10.15.0
1+
10.20.1

CHANGELOG.md

Whitespace-only changes.

RELEASE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 installed your projects dependencies:
34+
35+
```
36+
yarn install
37+
```
38+
39+
* And last (but not least 😁) do your release. It requires a
40+
[GitHub personal access token](https://github.com/settings/tokens) as
41+
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
42+
or other scopes are required.
43+
44+
```
45+
export GITHUB_AUTH="f941e0..."
46+
yarn run release
47+
```
48+
49+
[release-it](https://github.com/release-it/release-it/) manages the actual
50+
release process. It will prompt you to to choose the version number after which
51+
you will have the chance to hand tweak the changelog to be used (for the
52+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
53+
pushing the tag and commits, etc.
54+

package.json

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"keywords": [
66
"ember-addon"
77
],
8+
"homepage": "https://yapplabs.github.io/ember-data-utils",
89
"repository": "git@github.com:yapplabs/ember-data-utils.git",
910
"license": "MIT",
1011
"author": "",
@@ -16,6 +17,7 @@
1617
"build": "ember build",
1718
"lint:hbs": "ember-template-lint .",
1819
"lint:js": "eslint .",
20+
"release": "release-it",
1921
"start": "ember serve",
2022
"test": "ember test",
2123
"test:all": "ember try:each"
@@ -40,7 +42,6 @@
4042
"ember-cli-eslint": "^4.2.3",
4143
"ember-cli-htmlbars-inline-precompile": "^1.0.3",
4244
"ember-cli-inject-live-reload": "^1.8.2",
43-
"ember-cli-release": "^1.0.0-beta.2",
4445
"ember-cli-sri": "^2.1.1",
4546
"ember-cli-template-lint": "^1.0.0-beta.1",
4647
"ember-cli-uglify": "^2.1.0",
@@ -56,16 +57,35 @@
5657
"eslint-plugin-ember": "^6.2.0",
5758
"eslint-plugin-node": "^8.0.1",
5859
"loader.js": "^4.7.0",
59-
"qunit-dom": "^0.8.0"
60+
"qunit-dom": "^0.8.0",
61+
"release-it": "^13.6.0",
62+
"release-it-lerna-changelog": "^2.3.0"
63+
},
64+
"peerDependencies": {
65+
"ember-data": "^3.8.0"
6066
},
6167
"engines": {
6268
"node": "6.* || 8.* || >= 10.*"
6369
},
70+
"publishConfig": {
71+
"registry": "https://registry.npmjs.org"
72+
},
6473
"ember-addon": {
6574
"configPath": "tests/dummy/config"
6675
},
67-
"peerDependencies": {
68-
"ember-data": "^3.8.0"
69-
},
70-
"homepage": "https://yapplabs.github.io/ember-data-utils"
76+
"release-it": {
77+
"plugins": {
78+
"release-it-lerna-changelog": {
79+
"infile": "CHANGELOG.md",
80+
"launchEditor": false
81+
}
82+
},
83+
"git": {
84+
"tagName": "v${version}"
85+
},
86+
"github": {
87+
"release": true,
88+
"tokenRef": "GITHUB_AUTH"
89+
}
90+
}
7191
}

0 commit comments

Comments
 (0)