Skip to content

Commit cc99bc4

Browse files
author
Robert Jackson
committed
Add automated release setup.
1 parent 15909fa commit cc99bc4

File tree

4 files changed

+2036
-51
lines changed

4 files changed

+2036
-51
lines changed

CHANGELOG.md

Whitespace-only changes.

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: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22
"name": "ember-component-template-colocation-migrator",
33
"version": "1.0.0",
44
"description": "A codemod that moves your component .hbs files to be co-located with their .js",
5-
"author": "Gavin Joyce <gavinjoyce@gmail.com>",
5+
"homepage": "https://github.com/ember-codemods/ember-component-template-colocation-migrator#readme",
6+
"bugs": {
7+
"url": "https://github.com/ember-codemods/ember-component-template-colocation-migrator/issues"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/ember-codemods/ember-component-template-colocation-migrator.git"
12+
},
613
"license": "MIT",
14+
"author": "Gavin Joyce <gavinjoyce@gmail.com>",
715
"main": "lib/index.js",
816
"bin": {
917
"ember-component-template-colocation-migrator": "./bin/ember-component-template-colocation-migrator"
1018
},
1119
"scripts": {
1220
"test": "mocha test/*-test.js test/**/*-test.js"
1321
},
14-
"devDependencies": {
15-
"assert-diff": "^2.0.3",
16-
"fixturify": "^1.0.1",
17-
"mocha": "^6.1.1"
18-
},
1922
"dependencies": {
2023
"@babel/core": "^7.7.5",
2124
"@babel/parser": "^7.7.5",
@@ -30,12 +33,29 @@
3033
"remove-empty-directories": "^0.0.1",
3134
"yargs": "^15.3.1"
3235
},
33-
"repository": {
34-
"type": "git",
35-
"url": "git+https://github.com/GavinJoyce/ember-component-template-colocation-migrator.git"
36+
"devDependencies": {
37+
"assert-diff": "^2.0.3",
38+
"fixturify": "^1.0.1",
39+
"mocha": "^6.1.1",
40+
"release-it": "^13.6.0",
41+
"release-it-lerna-changelog": "^2.3.0"
3642
},
37-
"bugs": {
38-
"url": "https://github.com/GavinJoyce/ember-component-template-colocation-migrator/issues"
43+
"publishConfig": {
44+
"registry": "https://registry.npmjs.org"
3945
},
40-
"homepage": "https://github.com/GavinJoyce/ember-component-template-colocation-migrator#readme"
46+
"release-it": {
47+
"plugins": {
48+
"release-it-lerna-changelog": {
49+
"infile": "CHANGELOG.md",
50+
"launchEditor": true
51+
}
52+
},
53+
"git": {
54+
"tagName": "v${version}"
55+
},
56+
"github": {
57+
"release": true,
58+
"tokenRef": "GITHUB_AUTH"
59+
}
60+
}
4161
}

0 commit comments

Comments
 (0)