Skip to content

Commit 29d69a4

Browse files
author
Robert Jackson
authored
Add automated release setup and documentation. (#122)
Add automated release setup and documentation.
2 parents 7494c3e + 9e55f3d commit 29d69a4

File tree

4 files changed

+1590
-67
lines changed

4 files changed

+1590
-67
lines changed

CHANGELOG.md

Whitespace-only changes.

RELEASE.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
```
34+
yarn install
35+
yarn release
36+
```
37+
38+
The `release` script leverages
39+
[release-it](https://github.com/release-it/release-it/) to do the mechanical
40+
release process. It will prompt you through the process of choosing the version
41+
number, tagging, pushing the tag and commits, etc.

package.json

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
{
22
"name": "ember-es6-class-codemod",
33
"version": "0.1.3",
4-
"scripts": {
5-
"test": "eslint . && codemod-cli test && node ./test/run-test.js",
6-
"update-docs": "codemod-cli update-docs"
7-
},
8-
"bin": "./bin/cli.js",
94
"keywords": [
105
"codemod-cli"
116
],
7+
"license": "MIT",
128
"files": [
139
"/bin",
1410
"/lib",
1511
"/transforms/helpers",
1612
"/transforms/ember-object/index.js"
1713
],
18-
"license": "MIT",
14+
"bin": "./bin/cli.js",
15+
"scripts": {
16+
"release": "release-it",
17+
"test": "eslint . && codemod-cli test && node ./test/run-test.js",
18+
"update-docs": "codemod-cli update-docs"
19+
},
1920
"dependencies": {
2021
"codemod-cli": "^1.0.0",
2122
"fs-extra": "^8.0.1",
@@ -32,9 +33,30 @@
3233
"eslint-plugin-prettier": "^3.1.0",
3334
"execa": "^1.0.0",
3435
"jest": "^24.8.0",
35-
"prettier": "^1.18.2"
36+
"prettier": "^1.18.2",
37+
"release-it": "^12.2.1",
38+
"release-it-lerna-changelog": "^1.0.3"
3639
},
3740
"engines": {
3841
"node": "8.* || 10.* || >= 12.*"
42+
},
43+
"publishConfig": {
44+
"registry": "https://registry.npmjs.org"
45+
},
46+
"release-it": {
47+
"hooks": {
48+
"before:release": "yarn update-docs"
49+
},
50+
"plugins": {
51+
"release-it-lerna-changelog": {
52+
"infile": "CHANGELOG.md"
53+
}
54+
},
55+
"git": {
56+
"tagName": "v${version}"
57+
},
58+
"github": {
59+
"release": true
60+
}
3961
}
4062
}

0 commit comments

Comments
 (0)