Skip to content

Commit 140e864

Browse files
author
Robert Jackson
committed
Add simplified release setup.
1 parent d4c3a6d commit 140e864

File tree

4 files changed

+755
-73
lines changed

4 files changed

+755
-73
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- stage: additional tests
3535
env: NAME=floating dependencies
36-
install: yarn install --no-lockfile --non-interactive
36+
install: yarn install --no-lockfile --non-interactive --ignore-engines
3737
script: yarn test
3838

3939
- env: NAME=Node_6
@@ -48,7 +48,7 @@ before_install:
4848
- export PATH=$HOME/.yarn/bin:$PATH
4949

5050
install:
51-
- yarn install
51+
- yarn install --ignore-engines
5252

5353
script:
5454
- yarn test

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: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"test": "tests"
3030
},
3131
"scripts": {
32-
"changelog": "lerna-changelog",
3332
"lint:js": "eslint .",
33+
"release": "release-it",
3434
"test": "qunit tests/**/*-test.js"
3535
},
3636
"dependencies": {
@@ -56,13 +56,30 @@
5656
"eslint-plugin-node": "^8.0.1",
5757
"eslint-plugin-prettier": "^3.0.1",
5858
"jest": "^24.1.0",
59-
"lerna-changelog": "^0.8.2",
6059
"prettier": "^1.16.4",
6160
"qunit": "^2.9.1",
61+
"release-it": "^12.2.1",
62+
"release-it-lerna-changelog": "^1.0.3",
6263
"require-so-slow": "^1.2.0",
6364
"walk-sync": "^1.1.3"
6465
},
6566
"engines": {
6667
"node": "6.* || 8.* || >= 10"
68+
},
69+
"publishConfig": {
70+
"registry": "https://registry.npmjs.org"
71+
},
72+
"release-it": {
73+
"plugins": {
74+
"release-it-lerna-changelog": {
75+
"infile": "CHANGELOG.md"
76+
}
77+
},
78+
"git": {
79+
"tagName": "v${version}"
80+
},
81+
"github": {
82+
"release": true
83+
}
6784
}
6885
}

0 commit comments

Comments
 (0)