Skip to content

Commit f3c96b8

Browse files
authored
Merge pull request #44 from ember-codemods/release-it
Setup release-it
2 parents 0c29c5e + 1d2349f commit f3c96b8

File tree

4 files changed

+1869
-67
lines changed

4 files changed

+1869
-67
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

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: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,24 @@
22
"name": "ember-test-helpers-codemod",
33
"version": "0.2.0",
44
"description": "Codemod to transform your jQuery based ember tests to use @ember/test-helpers",
5-
"main": "index.js",
6-
"author": "Simon Ihmig <ihmig@kaliber5.de>",
7-
"repository": "https://github.com/simonihmig/ember-test-helpers-codemod",
8-
"license": "MIT",
9-
"bin": "./bin/cli.js",
105
"keywords": [
116
"codemod-cli"
127
],
8+
"repository": "https://github.com/simonihmig/ember-test-helpers-codemod",
9+
"license": "MIT",
10+
"author": "Simon Ihmig <ihmig@kaliber5.de>",
11+
"main": "index.js",
12+
"bin": "./bin/cli.js",
1313
"scripts": {
1414
"lint": "eslint --cache .",
1515
"test": "codemod-cli test",
1616
"test:coverage": "codemod-cli test --coverage",
1717
"update-docs": "codemod-cli update-docs",
1818
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls"
1919
},
20+
"jest": {
21+
"testEnvironment": "node"
22+
},
2023
"dependencies": {
2124
"codemod-cli": "^2.1.0"
2225
},
@@ -27,12 +30,29 @@
2730
"eslint-plugin-node": "^11.1.0",
2831
"eslint-plugin-prettier": "^3.3.1",
2932
"jest": "^24.9.0",
30-
"prettier": "^2.2.1"
33+
"prettier": "^2.2.1",
34+
"release-it": "^14.2.1",
35+
"release-it-lerna-changelog": "^3.1.0"
3136
},
3237
"engines": {
3338
"node": "10.* || >= 12"
3439
},
35-
"jest": {
36-
"testEnvironment": "node"
40+
"publishConfig": {
41+
"registry": "https://registry.npmjs.org"
42+
},
43+
"release-it": {
44+
"plugins": {
45+
"release-it-lerna-changelog": {
46+
"infile": "CHANGELOG.md",
47+
"launchEditor": true
48+
}
49+
},
50+
"git": {
51+
"tagName": "v${version}"
52+
},
53+
"github": {
54+
"release": true,
55+
"tokenRef": "GITHUB_AUTH"
56+
}
3757
}
3858
}

0 commit comments

Comments
 (0)