Skip to content

Commit e9cc6b5

Browse files
authored
Merge pull request #90 from rwjblue/update-release-setup
Update automated release steps
2 parents d4ffcf3 + a32118e commit e9cc6b5

3 files changed

Lines changed: 1013 additions & 666 deletions

File tree

RELEASE.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ have been merged since the last release have been labeled with the appropriate
1414
represent something that would make sense to our users. Some great information
1515
on why this is important can be found at
1616
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
17-
guiding principles here is that changelogs are for humans, not machines.
17+
guiding principle here is that changelogs are for humans, not machines.
1818

1919
When reviewing merged PR's the labels to be used are:
2020

@@ -30,12 +30,33 @@ When reviewing merged PR's the labels to be used are:
3030

3131
Once the prep work is completed, the actual release is straight forward:
3232

33+
* First, ensure that you have installed your projects dependencies:
34+
3335
```
3436
yarn install
35-
yarn release
3637
```
3738

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.
39+
* Second, ensure that you have obtained a
40+
[GitHub personal access token][generate-token] with the `repo` scope (no
41+
other permissions are needed). Make sure the token is available as the
42+
`GITHUB_AUTH` environment variable.
43+
44+
For instance:
45+
46+
```bash
47+
export GITHUB_AUTH=abc123def456
48+
```
49+
50+
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
51+
52+
* And last (but not least 😁) do your release.
53+
54+
```
55+
npx release-it
56+
```
57+
58+
[release-it](https://github.com/release-it/release-it/) manages the actual
59+
release process. It will prompt you to to choose the version number after which
60+
you will have the chance to hand tweak the changelog to be used (for the
61+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
62+
pushing the tag and commits, etc.

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
},
1717
"license": "MIT",
1818
"author": "Robert Jackson <[email protected]>",
19-
"files": [
20-
"src",
21-
"bin",
22-
"commands"
23-
],
2419
"main": "src/index.js",
2520
"bin": {
2621
"codemod-cli": "./bin/cli.js"
2722
},
2823
"directories": {
2924
"test": "tests"
3025
},
26+
"files": [
27+
"src",
28+
"bin",
29+
"commands"
30+
],
3131
"scripts": {
3232
"lint": "eslint .",
3333
"lint:js": "eslint .",
@@ -60,8 +60,8 @@
6060
"jest": "^24.9.0",
6161
"prettier": "^1.18.2",
6262
"qunit": "^2.9.2",
63-
"release-it": "^12.4.1",
64-
"release-it-lerna-changelog": "^1.0.3",
63+
"release-it": "^13.6.5",
64+
"release-it-lerna-changelog": "^2.3.0",
6565
"require-so-slow": "^1.2.0",
6666
"walk-sync": "^2.0.2"
6767
},
@@ -74,14 +74,16 @@
7474
"release-it": {
7575
"plugins": {
7676
"release-it-lerna-changelog": {
77-
"infile": "CHANGELOG.md"
77+
"infile": "CHANGELOG.md",
78+
"launchEditor": true
7879
}
7980
},
8081
"git": {
8182
"tagName": "v${version}"
8283
},
8384
"github": {
84-
"release": true
85+
"release": true,
86+
"tokenRef": "GITHUB_AUTH"
8587
}
8688
}
8789
}

0 commit comments

Comments
 (0)