Skip to content

Commit 4d46c9a

Browse files
Add back release-it
1 parent 0c07b0c commit 4d46c9a

3 files changed

Lines changed: 2008 additions & 18 deletions

File tree

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+
pnpm 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+
pnpm exec 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: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"private": true,
3-
"repository": "",
3+
"repository": "https://github.com/minutebase/ember-can",
44
"license": "MIT",
5-
"author": "",
5+
"author": "Richard Livsey <richard@minutebase.com>",
66
"scripts": {
77
"build": "pnpm --filter ember-can build",
88
"lint": "pnpm --filter '*' lint",
@@ -14,11 +14,40 @@
1414
"test": "pnpm --filter '*' test",
1515
"test:ember": "pnpm --filter '*' test:ember"
1616
},
17-
"packageManager": "pnpm@10.0.0",
1817
"devDependencies": {
1918
"@glint/core": "^1.5.2",
19+
"@release-it-plugins/lerna-changelog": "^6.1.0",
20+
"@release-it-plugins/workspaces": "^4.2.0",
2021
"concurrently": "^9.1.2",
2122
"prettier": "^3.5.3",
22-
"prettier-plugin-ember-template-tag": "^2.0.5"
23-
}
24-
}
23+
"prettier-plugin-ember-template-tag": "^2.0.5",
24+
"release-it": "^17.2.1"
25+
},
26+
"publishConfig": {
27+
"registry": "https://registry.npmjs.org"
28+
},
29+
"release-it": {
30+
"plugins": {
31+
"@release-it-plugins/workspaces": {
32+
"workspaces": [
33+
"ember-can"
34+
]
35+
},
36+
"@release-it-plugins/lerna-changelog": {
37+
"infile": "CHANGELOG.md"
38+
}
39+
},
40+
"git": {
41+
"tagName": "v${version}",
42+
"commitMessage": "v${version}",
43+
"pushArgs": "--follow-tags --no-verify"
44+
},
45+
"github": {
46+
"release": true,
47+
"releaseName": "v${version}",
48+
"tokenRef": "GITHUB_AUTH"
49+
},
50+
"npm": false
51+
},
52+
"packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808"
53+
}

0 commit comments

Comments
 (0)