Skip to content

Commit e2f137b

Browse files
Add rwjblue release-it
1 parent 0938667 commit e2f137b

File tree

3 files changed

+1277
-112
lines changed

3 files changed

+1277
-112
lines changed

RELEASE.md

Lines changed: 60 additions & 0 deletions
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.

package.json

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,22 @@
1313
"notifications",
1414
"notify"
1515
],
16+
"homepage": "https://github.com/poteto/ember-cli-flash",
17+
"bugs": "https://github.com/poteto/ember-cli-flash/issues",
1618
"repository": "https://github.com/poteto/ember-cli-flash",
1719
"license": "MIT",
1820
"author": "Lauren Tan",
21+
"contributors": [
22+
{
23+
"name": "Mike North"
24+
},
25+
{
26+
"name": "Scott Batson"
27+
},
28+
{
29+
"name": "Brian Runnells"
30+
}
31+
],
1932
"directories": {
2033
"doc": "doc",
2134
"test": "tests"
@@ -35,19 +48,6 @@
3548
"test:ember-compatibility": "ember try:each",
3649
"contributors": "npx contributor-faces -e \"(*-bot|*\\[bot\\]|*-tomster|homu)\""
3750
},
38-
"bugs": "https://github.com/poteto/ember-cli-flash/issues",
39-
"homepage": "https://github.com/poteto/ember-cli-flash",
40-
"contributors": [
41-
{
42-
"name": "Mike North"
43-
},
44-
{
45-
"name": "Scott Batson"
46-
},
47-
{
48-
"name": "Brian Runnells"
49-
}
50-
],
5151
"dependencies": {
5252
"@ember/render-modifiers": "^2.0.2",
5353
"ember-auto-import": "^2.4.1",
@@ -91,15 +91,35 @@
9191
"prettier": "^2.6.2",
9292
"qunit": "^2.19.1",
9393
"qunit-dom": "^2.0.0",
94+
"release-it": "^14.2.1",
95+
"release-it-lerna-changelog": "^3.1.0",
9496
"webpack": "^5.72.1"
9597
},
9698
"engines": {
9799
"node": "12.* || 14.* || >= 16"
98100
},
101+
"publishConfig": {
102+
"registry": "https://registry.npmjs.org"
103+
},
99104
"ember": {
100105
"edition": "octane"
101106
},
102107
"ember-addon": {
103108
"configPath": "tests/dummy/config"
109+
},
110+
"release-it": {
111+
"plugins": {
112+
"release-it-lerna-changelog": {
113+
"infile": "CHANGELOG.md",
114+
"launchEditor": true
115+
}
116+
},
117+
"git": {
118+
"tagName": "v${version}"
119+
},
120+
"github": {
121+
"release": true,
122+
"tokenRef": "GITHUB_AUTH"
123+
}
104124
}
105125
}

0 commit comments

Comments
 (0)