Skip to content

Commit a6ca9d7

Browse files
committed
Add release-it config
1 parent 48f9d15 commit a6ca9d7

File tree

3 files changed

+1857
-98
lines changed

3 files changed

+1857
-98
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: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"keywords": [
66
"ember-addon"
77
],
8-
"repository": "",
8+
"repository": {
9+
"type": "git",
10+
"url": "git@github.com:yapplabs/ember-radio-button.git"
11+
},
912
"license": "MIT",
1013
"author": "",
1114
"directories": {
@@ -66,19 +69,39 @@
6669
"npm-run-all": "^4.1.5",
6770
"prettier": "^2.3.2",
6871
"qunit": "^2.16.0",
69-
"qunit-dom": "^2.0.0"
72+
"qunit-dom": "^2.0.0",
73+
"release-it": "^14.2.1",
74+
"release-it-lerna-changelog": "^3.1.0"
7075
},
7176
"engines": {
7277
"node": "12.* || 14.* || >= 16"
7378
},
79+
"volta": {
80+
"node": "14.19.3",
81+
"yarn": "1.22.18"
82+
},
83+
"publishConfig": {
84+
"registry": "https://registry.npmjs.org"
85+
},
7486
"ember": {
7587
"edition": "octane"
7688
},
7789
"ember-addon": {
7890
"configPath": "tests/dummy/config"
7991
},
80-
"volta": {
81-
"node": "14.19.3",
82-
"yarn": "1.22.18"
92+
"release-it": {
93+
"plugins": {
94+
"release-it-lerna-changelog": {
95+
"infile": "CHANGELOG.md",
96+
"launchEditor": false
97+
}
98+
},
99+
"git": {
100+
"tagName": "v${version}"
101+
},
102+
"github": {
103+
"release": true,
104+
"tokenRef": "GITHUB_AUTH"
105+
}
83106
}
84107
}

0 commit comments

Comments
 (0)