Skip to content

Commit 5b3a0cf

Browse files
authoredMar 20, 2021
Merge pull request #6 from Windvis/release-it-setup
Set up release-it
2 parents b251e8a + 2ee4a37 commit 5b3a0cf

File tree

4 files changed

+1513
-92
lines changed

4 files changed

+1513
-92
lines changed
 

‎CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Changelog

‎RELEASE.md

+60
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

+27-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
{
22
"name": "ember-router-service-refresh-polyfill",
33
"version": "0.0.0",
4-
"description": "The default blueprint for ember-cli addons.",
4+
"description": "Polyfill for Ember RFC 631",
55
"keywords": [
66
"ember-addon"
77
],
8-
"repository": "",
8+
"repository": {
9+
"type": "git",
10+
"url": "git@github.com:Windvis/ember-router-service-refresh-polyfill.git"
11+
},
912
"license": "MIT",
10-
"author": "",
13+
"author": "Windvis",
1114
"directories": {
1215
"doc": "doc",
1316
"test": "tests"
@@ -62,15 +65,35 @@
6265
"npm-run-all": "^4.1.5",
6366
"prettier": "^2.2.1",
6467
"qunit": "^2.14.0",
65-
"qunit-dom": "^1.6.0"
68+
"qunit-dom": "^1.6.0",
69+
"release-it": "^14.2.1",
70+
"release-it-lerna-changelog": "^3.1.0"
6671
},
6772
"engines": {
6873
"node": "10.* || >= 12"
6974
},
75+
"publishConfig": {
76+
"registry": "https://registry.npmjs.org"
77+
},
7078
"ember": {
7179
"edition": "octane"
7280
},
7381
"ember-addon": {
7482
"configPath": "tests/dummy/config"
83+
},
84+
"release-it": {
85+
"plugins": {
86+
"release-it-lerna-changelog": {
87+
"infile": "CHANGELOG.md",
88+
"launchEditor": false
89+
}
90+
},
91+
"git": {
92+
"tagName": "v${version}"
93+
},
94+
"github": {
95+
"release": true,
96+
"tokenRef": "GITHUB_AUTH"
97+
}
7598
}
7699
}

‎yarn.lock

+1,425-88
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.