Skip to content

Commit 07c0a32

Browse files
committed
Setup release-it
1 parent a4adc09 commit 07c0a32

File tree

4 files changed

+1397
-119
lines changed

4 files changed

+1397
-119
lines changed

CHANGELOG.md

Whitespace-only changes.

RELEASE.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
* Second, ensure that you have obtained a
40+
[GitHub personal access token][generate-token] with the `repo` scope (no
41+
other permissions are needed). Make sure the token is available as the
42+
`GITHUB_AUTH` environment variable.
43+
44+
For instance:
45+
46+
```bash
47+
export GITHUB_AUTH=abc123def456
48+
```
49+
50+
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
51+
52+
* And last (but not least 😁) do your release.
53+
54+
```
55+
npx release-it
56+
```
57+
58+
[release-it](https://github.com/release-it/release-it/) manages the actual
59+
release process. It will prompt you to to choose the version number after which
60+
you will have the chance to hand tweak the changelog to be used (for the
61+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
62+
pushing the tag and commits, etc.

package.json

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
"bootstrap",
1111
"validations"
1212
],
13+
"repository": {
14+
"type": "git",
15+
"url": "http://github.com/offirgolan/ember-bootstrap-cp-validations.git"
16+
},
1317
"license": "MIT",
1418
"author": "offirgolan@gmail.com",
1519
"directories": {
1620
"doc": "doc",
1721
"test": "tests"
1822
},
19-
"repository": {
20-
"type": "git",
21-
"url": "http://github.com/offirgolan/ember-bootstrap-cp-validations.git"
22-
},
2323
"scripts": {
2424
"build": "ember build --environment=production",
2525
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*",
@@ -65,16 +65,36 @@
6565
"eslint-plugin-node": "^11.1.0",
6666
"loader.js": "^4.7.0",
6767
"npm-run-all": "^4.1.5",
68-
"qunit-dom": "^1.4.0"
68+
"qunit-dom": "^1.4.0",
69+
"release-it": "^13.6.5",
70+
"release-it-lerna-changelog": "^2.3.0"
6971
},
7072
"engines": {
7173
"node": "10.* || >= 12"
7274
},
75+
"publishConfig": {
76+
"registry": "https://registry.npmjs.org"
77+
},
7378
"ember": {
7479
"edition": "octane"
7580
},
7681
"ember-addon": {
7782
"configPath": "tests/dummy/config",
7883
"after": "ember-bootstrap"
84+
},
85+
"release-it": {
86+
"plugins": {
87+
"release-it-lerna-changelog": {
88+
"infile": "CHANGELOG.md",
89+
"launchEditor": true
90+
}
91+
},
92+
"git": {
93+
"tagName": "v${version}"
94+
},
95+
"github": {
96+
"release": true,
97+
"tokenRef": "GITHUB_AUTH"
98+
}
7999
}
80100
}

0 commit comments

Comments
 (0)