Skip to content

Commit b770b86

Browse files
authored
Merge pull request #31 from ember-cli-deploy/chore/release-it
Switch to release-it from ember-cli-release
2 parents 6feed53 + e38982d commit b770b86

File tree

3 files changed

+1553
-1164
lines changed

3 files changed

+1553
-1164
lines changed

RELEASE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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 `release-it` installed globally, generally done by
34+
using one of the following commands:
35+
36+
```
37+
# using https://volta.sh
38+
volta install release-it
39+
40+
# using Yarn
41+
yarn global add release-it
42+
43+
# using npm
44+
npm install --global release-it
45+
```
46+
47+
* Second, ensure that you have installed your projects dependencies:
48+
49+
```
50+
yarn install
51+
```
52+
53+
* And last (but not least 😁) do your release. It requires a
54+
[GitHub personal access token](https://github.com/settings/tokens) as
55+
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
56+
or other scopes are required.
57+
58+
```
59+
export GITHUB_AUTH="f941e0..."
60+
release-it
61+
```
62+
63+
[release-it](https://github.com/release-it/release-it/) manages the actual
64+
release process. It will prompt you to to choose the version number after which
65+
you will have the chance to hand tweak the changelog to be used (for the
66+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
67+
pushing the tag and commits, etc.

package.json

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"ember-addon",
77
"ember-cli-deploy-plugin"
88
],
9+
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-display-revisions",
910
"license": "MIT",
1011
"author": "",
1112
"directories": {
1213
"doc": "doc",
1314
"test": "tests"
1415
},
15-
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-display-revisions",
1616
"scripts": {
1717
"test": "node tests/runner.js && ./node_modules/.bin/eslint index.js lib/* tests/*"
1818
},
@@ -27,13 +27,32 @@
2727
"chai": "^4.2.0",
2828
"chai-as-promised": "^7.1.1",
2929
"ember-cli": "^3.18.0",
30-
"ember-cli-release": "^1.0.0-beta.2",
3130
"eslint": "^7.0.0",
3231
"glob": "^7.1.6",
33-
"mocha": "^7.1.2"
32+
"mocha": "^7.1.2",
33+
"release-it": "^13.6.0",
34+
"release-it-lerna-changelog": "^2.3.0"
3435
},
3536
"engines": {
3637
"node": ">= 10"
3738
},
38-
"ember-addon": {}
39+
"publishConfig": {
40+
"registry": "https://registry.npmjs.org"
41+
},
42+
"ember-addon": {},
43+
"release-it": {
44+
"plugins": {
45+
"release-it-lerna-changelog": {
46+
"infile": "CHANGELOG.md",
47+
"launchEditor": false
48+
}
49+
},
50+
"git": {
51+
"tagName": "v${version}"
52+
},
53+
"github": {
54+
"release": true,
55+
"tokenRef": "GITHUB_AUTH"
56+
}
57+
}
3958
}

0 commit comments

Comments
 (0)