Skip to content

Commit b0c9e14

Browse files
Add rwjblue release-it config
1 parent 57a4427 commit b0c9e14

File tree

3 files changed

+1175
-96
lines changed

3 files changed

+1175
-96
lines changed

RELEASE.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Release
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+
8+
## Preparation
9+
10+
Since the majority of the actual release process is automated, the primary
11+
remaining task prior to releasing is confirming that all pull requests that
12+
have been merged since the last release have been labeled with the appropriate
13+
`lerna-changelog` labels and the titles have been updated to ensure they
14+
represent something that would make sense to our users. Some great information
15+
on why this is important can be found at
16+
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
17+
guiding principle here is that changelogs are for humans, not machines.
18+
19+
When reviewing merged PR's the labels to be used are:
20+
21+
* breaking - Used when the PR is considered a breaking change.
22+
* enhancement - Used when the PR adds a new feature or enhancement.
23+
* bug - Used when the PR fixes a bug included in a previous release.
24+
* documentation - Used when the PR adds or updates documentation.
25+
* internal - Used for internal changes that still require a mention in the
26+
changelog/release notes.
27+
28+
29+
## Release
30+
31+
Once the prep work is completed, the actual release is straight forward:
32+
33+
* First ensure that you have `release-it` installed globally, generally done by
34+
using one of the following commands:
35+
36+
```
37+
# using https://volta.sh
38+
volta install release-it
39+
40+
# using Yarn
41+
yarn global add release-it
42+
43+
# using npm
44+
npm install --global release-it
45+
```
46+
47+
* Second, ensure that you have installed your projects dependencies:
48+
49+
```
50+
yarn install
51+
```
52+
53+
* And last (but not least 😁) do your release. It requires a
54+
[GitHub personal access token](https://github.com/settings/tokens) as
55+
`$GITHUB_AUTH` environment variable. Only "repo" access is needed; no "admin"
56+
or other scopes are required.
57+
58+
```
59+
export GITHUB_AUTH="f941e0..."
60+
release-it
61+
```
62+
63+
[release-it](https://github.com/release-it/release-it/) manages the actual
64+
release process. It will prompt you to to choose the version number after which
65+
you will have the chance to hand tweak the changelog to be used (for the
66+
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
67+
pushing the tag and commits, etc.

package.json

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,46 @@
1515
"email": "[email protected]",
1616
"url": "https://github.com/rwwagner90"
1717
},
18+
"main": "dist/vue-shepherd.common.js",
19+
"jsdelivr": "dist/vue-shepherd.umd.min.js",
20+
"unpkg": "dist/vue-shepherd.umd.min.js",
21+
"module": "dist/vue-shepherd.esm.js",
22+
"files": [
23+
"dist/vue-shepherd.common.js",
24+
"dist/vue-shepherd.umd.min.js",
25+
"dist/vue-shepherd.umd.js",
26+
"dist/vue-shepherd.esm.js",
27+
"src"
28+
],
1829
"scripts": {
19-
"serve": "yarn demo",
2030
"build": "vue-cli-service build",
21-
"lint": "vue-cli-service lint",
2231
"demo": "vue-cli-service demo",
2332
"docs": "yarn docs:serve",
2433
"docs:build": "vue-cli-service docs --mode build",
2534
"docs:serve": "vue-cli-service docs --mode serve",
35+
"lint": "vue-cli-service lint",
2636
"prepublish": "yarn lint && yarn build",
37+
"serve": "yarn demo",
2738
"start": "yarn serve"
2839
},
29-
"main": "dist/vue-shepherd.common.js",
30-
"module": "dist/vue-shepherd.esm.js",
31-
"unpkg": "dist/vue-shepherd.umd.min.js",
32-
"files": [
33-
"dist/vue-shepherd.common.js",
34-
"dist/vue-shepherd.umd.min.js",
35-
"dist/vue-shepherd.umd.js",
36-
"dist/vue-shepherd.esm.js",
37-
"src"
40+
"browserslist": [
41+
"> 1%",
42+
"last 2 versions"
3843
],
44+
"eslintConfig": {
45+
"env": {
46+
"node": true
47+
},
48+
"parserOptions": {
49+
"parser": "babel-eslint"
50+
},
51+
"extends": [
52+
"plugin:vue/essential",
53+
"eslint:recommended"
54+
],
55+
"rules": {},
56+
"root": true
57+
},
3958
"dependencies": {
4059
"shepherd.js": "^8.0.1"
4160
},
@@ -46,32 +65,33 @@
4665
"babel-eslint": "^10.1.0",
4766
"eslint": "^7.3.0",
4867
"eslint-plugin-vue": "^6.2.2",
68+
"release-it": "^13.6.0",
69+
"release-it-lerna-changelog": "^2.3.0",
4970
"vue-cli-plugin-p11n": "^0.4.0",
5071
"vue-template-compiler": "^2.6.11"
5172
},
52-
"eslintConfig": {
53-
"root": true,
54-
"env": {
55-
"node": true
56-
},
57-
"extends": [
58-
"plugin:vue/essential",
59-
"eslint:recommended"
60-
],
61-
"rules": {},
62-
"parserOptions": {
63-
"parser": "babel-eslint"
64-
}
73+
"publishConfig": {
74+
"registry": "https://registry.npmjs.org"
6575
},
6676
"postcss": {
6777
"plugins": {
6878
"autoprefixer": {}
6979
}
7080
},
71-
"browserslist": [
72-
"> 1%",
73-
"last 2 versions"
74-
],
75-
"jsdelivr": "dist/vue-shepherd.umd.min.js",
81+
"release-it": {
82+
"plugins": {
83+
"release-it-lerna-changelog": {
84+
"infile": "CHANGELOG.md",
85+
"launchEditor": false
86+
}
87+
},
88+
"git": {
89+
"tagName": "v${version}"
90+
},
91+
"github": {
92+
"release": true,
93+
"tokenRef": "GITHUB_AUTH"
94+
}
95+
},
7696
"sideeffects": false
7797
}

0 commit comments

Comments
 (0)