Skip to content

Commit ddd742b

Browse files
author
Robert Jackson
authored
Merge pull request #125 from ember-fastboot/add-automated-release-setup
Add release automation.
2 parents 375e44c + c99bd6a commit ddd742b

File tree

3 files changed

+2212
-65
lines changed

3 files changed

+2212
-65
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: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,26 @@
22
"name": "fastboot-app-server",
33
"version": "2.0.0",
44
"description": "A production-ready app server for running Ember FastBoot apps",
5-
"main": "src/fastboot-app-server.js",
6-
"scripts": {
7-
"lint:js": "eslint --cache .",
8-
"test": "yarn lint:js && NODE_ENV=test mocha"
9-
},
10-
"repository": {
11-
"type": "git",
12-
"url": "git+https://github.com/ember-fastboot/fastboot-app-server.git"
13-
},
14-
"engines": {
15-
"node": "10.* || 12.* || >= 14"
16-
},
175
"keywords": [
186
"ember",
197
"fastboot",
208
"server"
219
],
22-
"author": "Tom Dale <[email protected]>",
23-
"license": "MIT",
10+
"homepage": "https://github.com/ember-fastboot/fastboot-app-server#readme",
2411
"bugs": {
2512
"url": "https://github.com/ember-fastboot/fastboot-app-server/issues"
2613
},
27-
"homepage": "https://github.com/ember-fastboot/fastboot-app-server#readme",
14+
"repository": {
15+
"type": "git",
16+
"url": "git+https://github.com/ember-fastboot/fastboot-app-server.git"
17+
},
18+
"license": "MIT",
19+
"author": "Tom Dale <[email protected]>",
20+
"main": "src/fastboot-app-server.js",
21+
"scripts": {
22+
"lint:js": "eslint --cache .",
23+
"test": "yarn lint:js && NODE_ENV=test mocha"
24+
},
2825
"dependencies": {
2926
"basic-auth": "^2.0.0",
3027
"chalk": "^2.0.1",
@@ -39,7 +36,30 @@
3936
"eslint-plugin-mocha": "^6.3.0",
4037
"eslint-plugin-node": "^11.1.0",
4138
"mocha": "^5.0.0",
39+
"release-it": "^14.2.0",
40+
"release-it-lerna-changelog": "^3.0.0",
4241
"request": "^2.81.0",
4342
"request-promise": "^4.2.1"
43+
},
44+
"engines": {
45+
"node": "10.* || 12.* || >= 14"
46+
},
47+
"publishConfig": {
48+
"registry": "https://registry.npmjs.org"
49+
},
50+
"release-it": {
51+
"plugins": {
52+
"release-it-lerna-changelog": {
53+
"infile": "CHANGELOG.md",
54+
"launchEditor": true
55+
}
56+
},
57+
"git": {
58+
"tagName": "v${version}"
59+
},
60+
"github": {
61+
"release": true,
62+
"tokenRef": "GITHUB_AUTH"
63+
}
4464
}
4565
}

0 commit comments

Comments
 (0)