Skip to content

Commit bdb02b6

Browse files
committed
Use release-it for releasing
1 parent aa12da2 commit bdb02b6

File tree

4 files changed

+1674
-1228
lines changed

4 files changed

+1674
-1228
lines changed

RELEASE.md

+54-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,60 @@
1-
# Release
1+
# Release Process
22

3-
The following steps should navigate you through the release process to ensure as few issues as possible.
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/).
46

5-
## Steps
7+
## Preparation
68

7-
### Commit the changelog, bump version, and publish to NPM
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.
817

9-
1. run `./bin/changelog` and add output to `CHANGELOG.md`
10-
2. edit changelog output to be as user-friendly as possible (drop [INTERNAL] changes etc.)
11-
3. `ember release`
12-
4. `npm publish`
18+
When reviewing merged PR's the labels to be used are:
1319

14-
### Create a github release
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.
1526

16-
1. under `Releases` on GitHub choose `Draft New Release`
17-
2. enter the new version number created above as the tag, prefixed with v e.g. (v0.1.12)
18-
3. for release title choose a great name, no pressure.
19-
4. in the description paste the upgrade instructions from the previous release, followed by the new CHANGELOG entry
20-
5. publish the release
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.

bin/changelog

-85
This file was deleted.

package.json

+37-19
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,60 @@
22
"name": "ember-cli-deploy-revision-data",
33
"version": "1.0.0",
44
"description": "An ember-cli-deploy plugin to generate data about this deploy revision including a unique revision key based on the current build",
5+
"keywords": [
6+
"ember-addon",
7+
"ember-cli-deploy-plugin"
8+
],
9+
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data",
10+
"license": "MIT",
11+
"author": "Aaron Chambers and the ember-cli-deploy team",
512
"directories": {
613
"doc": "doc",
714
"test": "tests"
815
},
916
"scripts": {
1017
"test": "eslint index.js lib/**/*.js tests/**/*.js && node ./tests/runner.js"
1118
},
12-
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-revision-data",
13-
"engines": {
14-
"node": ">= 4"
19+
"dependencies": {
20+
"chalk": "^4.1.1",
21+
"core-object": "^3.1.5",
22+
"ember-cli-deploy-plugin": "^0.2.9",
23+
"git-repo-info": "^2.1.1",
24+
"minimatch": "^3.0.4",
25+
"rsvp": "^4.8.5",
26+
"simple-git": "^2.38.0"
1527
},
16-
"author": "Aaron Chambers and the ember-cli-deploy team",
17-
"license": "MIT",
1828
"devDependencies": {
1929
"@octokit/rest": "^18.5.3",
2030
"chai": "^4.3.4",
2131
"chai-as-promised": "^7.1.1",
2232
"ember-cli": "^3.26.1",
23-
"ember-cli-release": "1.0.0-beta.2",
2433
"eslint": "^7.25.0",
2534
"glob": "^7.1.6",
2635
"mocha": "^8.3.2",
27-
"multiline": "^1.0.2"
36+
"release-it": "^14.6.1",
37+
"release-it-lerna-changelog": "^3.1.0"
2838
},
29-
"keywords": [
30-
"ember-addon",
31-
"ember-cli-deploy-plugin"
32-
],
33-
"dependencies": {
34-
"chalk": "^4.1.1",
35-
"core-object": "^3.1.5",
36-
"ember-cli-deploy-plugin": "^0.2.9",
37-
"git-repo-info": "^2.1.1",
38-
"minimatch": "^3.0.4",
39-
"rsvp": "^4.8.5",
40-
"simple-git": "^2.38.0"
39+
"engines": {
40+
"node": ">= 12"
41+
},
42+
"publishConfig": {
43+
"registry": "https://registry.npmjs.org"
44+
},
45+
"release-it": {
46+
"plugins": {
47+
"release-it-lerna-changelog": {
48+
"infile": "CHANGELOG.md",
49+
"launchEditor": false
50+
}
51+
},
52+
"git": {
53+
"tagName": "v${version}"
54+
},
55+
"github": {
56+
"release": true,
57+
"tokenRef": "GITHUB_AUTH"
58+
}
4159
},
4260
"volta": {
4361
"node": "14.16.1",

0 commit comments

Comments
 (0)