Skip to content

Commit 76f41c6

Browse files
committed
Setup release-it
1 parent 1d51144 commit 76f41c6

File tree

4 files changed

+1235
-48
lines changed

4 files changed

+1235
-48
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: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
"name": "@ember-cli-deploy/ember-cli-deploy-compress",
33
"version": "0.4.0",
44
"description": "Ember CLI Deploy plugin to compress files in gzip or brotli automatically depending on supported browsers (forked from Dockyard)",
5+
"keywords": [
6+
"ember-addon",
7+
"ember-cli-deploy-plugin"
8+
],
9+
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-compress",
10+
"license": "MIT",
11+
"author": "Miguel Camba",
512
"directories": {
613
"doc": "doc",
714
"test": "tests"
@@ -10,12 +17,14 @@
1017
"release": "release-it",
1118
"test": "mocha tests && eslint index.js tests/**/*.js"
1219
},
13-
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-compress",
14-
"engines": {
15-
"node": "14.* || 16.* || 18.* || >= 20.*"
20+
"dependencies": {
21+
"caniuse-api": "^2.0.0",
22+
"chalk": "^1.1.3",
23+
"core-object": "^2.1.1",
24+
"ember-cli-deploy-plugin": "^0.2.9",
25+
"minimatch": "^3.1.2",
26+
"rsvp": "^3.6.2"
1627
},
17-
"author": "Miguel Camba",
18-
"license": "MIT",
1928
"devDependencies": {
2029
"chai": "^3.5.0",
2130
"chai-as-promised": "^6.0.0",
@@ -27,28 +36,22 @@
2736
"mocha": "^5.2.0",
2837
"multiline": "^1.0.2",
2938
"node-zopfli-es": "^2.0.2",
39+
"npm": "^9.7.1",
3040
"release-it": "14.11.8",
31-
"release-it-lerna-changelog": "^3.1.0",
41+
"release-it-lerna-changelog": "~3.1.0",
3242
"rimraf": "^2.3.4"
3343
},
34-
"keywords": [
35-
"ember-addon",
36-
"ember-cli-deploy-plugin"
37-
],
38-
"dependencies": {
39-
"caniuse-api": "^2.0.0",
40-
"chalk": "^1.1.3",
41-
"core-object": "^2.1.1",
42-
"ember-cli-deploy-plugin": "^0.2.9",
43-
"minimatch": "^3.1.2",
44-
"rsvp": "^3.6.2"
45-
},
46-
"ember-addon": {
47-
"configPath": "tests/dummy/config"
44+
"engines": {
45+
"npm": "9.7.1",
46+
"node": "14.* || 16.* || 18.* || >= 20.*"
4847
},
4948
"publishConfig": {
49+
"access": "public",
5050
"registry": "https://registry.npmjs.org/"
5151
},
52+
"ember-addon": {
53+
"configPath": "tests/dummy/config"
54+
},
5255
"release-it": {
5356
"plugins": {
5457
"release-it-lerna-changelog": {
@@ -57,10 +60,17 @@
5760
}
5861
},
5962
"git": {
63+
"tagName": "v${version}",
6064
"requireCleanWorkingDir": false
6165
},
6266
"github": {
63-
"release": true
67+
"release": true,
68+
"tokenRef": "GITHUB_AUTH"
6469
}
70+
},
71+
"volta": {
72+
"node": "16.20.1",
73+
"yarn": "3.6.0-git.20230603.hash-3c8237cb",
74+
"npm": "9.7.1"
6575
}
6676
}

0 commit comments

Comments
 (0)