Skip to content

Commit a9e4145

Browse files
author
Robert Jackson
authored
Merge pull request #783 from ember-fastboot/update-release-configuration
Add automated release setup.
2 parents 3d04916 + 1f8635e commit a9e4145

6 files changed

Lines changed: 841 additions & 94 deletions

File tree

RELEASE.md

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# Release
1+
# Release Process
22

33
Releases are mostly automated using
44
[release-it](https://github.com/release-it/release-it/) and
5-
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
6-
5+
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
76

87
## Preparation
98

@@ -14,7 +13,7 @@ have been merged since the last release have been labeled with the appropriate
1413
represent something that would make sense to our users. Some great information
1514
on why this is important can be found at
1615
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
17-
guiding principles here is that changelogs are for humans, not machines.
16+
guiding principle here is that changelogs are for humans, not machines.
1817

1918
When reviewing merged PR's the labels to be used are:
2019

@@ -25,17 +24,37 @@ When reviewing merged PR's the labels to be used are:
2524
* internal - Used for internal changes that still require a mention in the
2625
changelog/release notes.
2726

28-
2927
## Release
3028

3129
Once the prep work is completed, the actual release is straight forward:
3230

33-
```
31+
* First, ensure that you have installed your projects dependencies:
32+
33+
```sh
3434
yarn install
35-
yarn release
3635
```
3736

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.
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: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
1-
21
{
32
"private": true,
3+
"repository": {
4+
"type": "git",
5+
"url": "[email protected]:ember-fastboot/ember-cli-fastboot.git"
6+
},
47
"workspaces": [
5-
"packages/ember-cli-fastboot",
6-
"test-packages/basic-app",
8+
"packages/*",
79
"test-packages/*"
8-
]
10+
],
11+
"devDependencies": {
12+
"release-it": "^14.0.2",
13+
"release-it-lerna-changelog": "^2.4.0",
14+
"release-it-yarn-workspaces": "^1.5.0"
15+
},
16+
"publishConfig": {
17+
"registry": "https://registry.npmjs.org"
18+
},
19+
"release-it": {
20+
"plugins": {
21+
"release-it-lerna-changelog": {
22+
"infile": "CHANGELOG.md",
23+
"launchEditor": true
24+
},
25+
"release-it-yarn-workspaces": {
26+
"workspaces": [
27+
"packages/*"
28+
],
29+
"additionalManifests": {
30+
"versionUpdates": [
31+
"package.json",
32+
"test-packages/*/package.json"
33+
],
34+
"dependencyUpdates": [
35+
"package.json",
36+
"test-packages/*/package.json"
37+
]
38+
}
39+
}
40+
},
41+
"git": {
42+
"tagName": "v${version}"
43+
},
44+
"github": {
45+
"release": true,
46+
"tokenRef": "GITHUB_AUTH"
47+
},
48+
"npm": false
49+
}
950
}

packages/ember-cli-fastboot/package.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,6 @@
9191
"broccoli-serve-files"
9292
]
9393
},
94-
"release-it": {
95-
"plugins": {
96-
"release-it-lerna-changelog": {
97-
"infile": "CHANGELOG.md"
98-
}
99-
},
100-
"git": {
101-
"tagName": "v${version}"
102-
},
103-
"github": {
104-
"release": true
105-
}
106-
},
10794
"volta": {
10895
"node": "12.18.2",
10996
"yarn": "1.17.3"

test-packages/fake-addon-2/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"private": true,
23
"name": "fake-addon-2",
34
"version": "0.1.0",
45
"ember-addon": {

test-packages/fake-addon/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"private": true,
23
"name": "fake-addon",
34
"version": "0.1.0",
45
"ember-addon": {

0 commit comments

Comments
 (0)