Skip to content

Commit 1b84e2a

Browse files
Add rwjblue release-it
1 parent affa692 commit 1b84e2a

File tree

4 files changed

+1362
-103
lines changed

4 files changed

+1362
-103
lines changed

Diff for: CHANGELOG.md

Whitespace-only changes.

Diff for: RELEASE.md

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Release Process
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+
## Preparation
8+
9+
Since the majority of the actual release process is automated, the primary
10+
remaining task prior to releasing is confirming that all pull requests that
11+
have been merged since the last release have been labeled with the appropriate
12+
`lerna-changelog` labels and the titles have been updated to ensure they
13+
represent something that would make sense to our users. Some great information
14+
on why this is important can be found at
15+
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
16+
guiding principle here is that changelogs are for humans, not machines.
17+
18+
When reviewing merged PR's the labels to be used are:
19+
20+
* breaking - Used when the PR is considered a breaking change.
21+
* enhancement - Used when the PR adds a new feature or enhancement.
22+
* bug - Used when the PR fixes a bug included in a previous release.
23+
* documentation - Used when the PR adds or updates documentation.
24+
* internal - Used for internal changes that still require a mention in the
25+
changelog/release notes.
26+
27+
## Release
28+
29+
Once the prep work is completed, the actual release is straight forward:
30+
31+
* First, ensure that you have installed your projects dependencies:
32+
33+
```sh
34+
yarn install
35+
```
36+
37+
* Second, ensure that you have obtained a
38+
[GitHub personal access token][generate-token] with the `repo` scope (no
39+
other permissions are needed). Make sure the token is available as the
40+
`GITHUB_AUTH` environment variable.
41+
42+
For instance:
43+
44+
```bash
45+
export GITHUB_AUTH=abc123def456
46+
```
47+
48+
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
49+
50+
* And last (but not least 😁) do your release.
51+
52+
```sh
53+
npx release-it
54+
```
55+
56+
[release-it](https://github.com/release-it/release-it/) manages the actual
57+
release process. It will prompt you to to choose the version number after which
58+
you will have the chance to hand tweak the changelog to be used (for the
59+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
60+
pushing the tag and commits, etc.

Diff for: package.json

+22-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"ember-addon",
77
"ember-cli-addon-docs-plugin"
88
],
9+
"repository": "https://github.com/ember-learn/ember-cli-addon-docs-yuidoc",
910
"license": "MIT",
1011
"author": "",
1112
"directories": {
1213
"doc": "doc",
1314
"test": "tests"
1415
},
15-
"repository": "https://github.com/ember-learn/ember-cli-addon-docs-yuidoc",
1616
"scripts": {
1717
"build": "ember build --environment=production",
1818
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
@@ -58,15 +58,35 @@
5858
"eslint-plugin-node": "^11.1.0",
5959
"loader.js": "^4.7.0",
6060
"mocha": "^8.2.0",
61-
"npm-run-all": "^4.1.5"
61+
"npm-run-all": "^4.1.5",
62+
"release-it": "^14.2.0",
63+
"release-it-lerna-changelog": "^3.0.0"
6264
},
6365
"engines": {
6466
"node": "10.* || >= 12"
6567
},
68+
"publishConfig": {
69+
"registry": "https://registry.npmjs.org"
70+
},
6671
"ember": {
6772
"edition": "octane"
6873
},
6974
"ember-addon": {
7075
"configPath": "tests/dummy/config"
76+
},
77+
"release-it": {
78+
"plugins": {
79+
"release-it-lerna-changelog": {
80+
"infile": "CHANGELOG.md",
81+
"launchEditor": true
82+
}
83+
},
84+
"git": {
85+
"tagName": "v${version}"
86+
},
87+
"github": {
88+
"release": true,
89+
"tokenRef": "GITHUB_AUTH"
90+
}
7191
}
7292
}

0 commit comments

Comments
 (0)