Add release-it
This commit is contained in:
parent
d53cd59b84
commit
39ee6d4000
4 changed files with 1669 additions and 94 deletions
1
CHANGELOG.md
Normal file
1
CHANGELOG.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Changelog
|
||||
60
RELEASE.md
Normal file
60
RELEASE.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# Release Process
|
||||
|
||||
Releases are mostly automated using
|
||||
[release-it](https://github.com/release-it/release-it/) and
|
||||
[lerna-changelog](https://github.com/lerna/lerna-changelog/).
|
||||
|
||||
## Preparation
|
||||
|
||||
Since the majority of the actual release process is automated, the primary
|
||||
remaining task prior to releasing is confirming that all pull requests that
|
||||
have been merged since the last release have been labeled with the appropriate
|
||||
`lerna-changelog` labels and the titles have been updated to ensure they
|
||||
represent something that would make sense to our users. Some great information
|
||||
on why this is important can be found at
|
||||
[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall
|
||||
guiding principle here is that changelogs are for humans, not machines.
|
||||
|
||||
When reviewing merged PR's the labels to be used are:
|
||||
|
||||
* breaking - Used when the PR is considered a breaking change.
|
||||
* enhancement - Used when the PR adds a new feature or enhancement.
|
||||
* bug - Used when the PR fixes a bug included in a previous release.
|
||||
* documentation - Used when the PR adds or updates documentation.
|
||||
* internal - Used for internal changes that still require a mention in the
|
||||
changelog/release notes.
|
||||
|
||||
## Release
|
||||
|
||||
Once the prep work is completed, the actual release is straight forward:
|
||||
|
||||
* First, ensure that you have installed your projects dependencies:
|
||||
|
||||
```sh
|
||||
yarn install
|
||||
```
|
||||
|
||||
* Second, ensure that you have obtained a
|
||||
[GitHub personal access token][generate-token] with the `repo` scope (no
|
||||
other permissions are needed). Make sure the token is available as the
|
||||
`GITHUB_AUTH` environment variable.
|
||||
|
||||
For instance:
|
||||
|
||||
```bash
|
||||
export GITHUB_AUTH=abc123def456
|
||||
```
|
||||
|
||||
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable
|
||||
|
||||
* And last (but not least 😁) do your release.
|
||||
|
||||
```sh
|
||||
npx release-it
|
||||
```
|
||||
|
||||
[release-it](https://github.com/release-it/release-it/) manages the actual
|
||||
release process. It will prompt you to to choose the version number after which
|
||||
you will have the chance to hand tweak the changelog to be used (for the
|
||||
`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging,
|
||||
pushing the tag and commits, etc.
|
||||
34
package.json
34
package.json
|
|
@ -4,15 +4,14 @@
|
|||
"private": true,
|
||||
"description": "Admin panel for MeiliSearch",
|
||||
"homepage": "https://kaermorchen.github.io/meiliadmin/",
|
||||
"bugs": {
|
||||
"url": "https://github.com/kaermorchen/meiliadmin/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+ssh://git@github.com/kaermorchen/meiliadmin.git"
|
||||
},
|
||||
"author": "Stanislav Romanov <kaermorchen@gmail.com>",
|
||||
"bugs": {
|
||||
"url" : "https://github.com/kaermorchen/meiliadmin/issues",
|
||||
"email": "kaermorchen@gmail.com"
|
||||
},
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
"test": "tests"
|
||||
|
|
@ -102,6 +101,8 @@
|
|||
"prettier": "^2.7.1",
|
||||
"qunit": "^2.19.1",
|
||||
"qunit-dom": "^2.0.0",
|
||||
"release-it": "^14.2.1",
|
||||
"release-it-lerna-changelog": "^3.1.0",
|
||||
"tailwindcss": "^3.1.8",
|
||||
"tracked-built-ins": "^3.1.0",
|
||||
"webpack": "^5.74.0"
|
||||
|
|
@ -109,11 +110,30 @@
|
|||
"engines": {
|
||||
"node": "14.* || >= 16"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
},
|
||||
"volta": {
|
||||
"node": "16.16.0",
|
||||
"yarn": "1.22.19"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org"
|
||||
},
|
||||
"ember": {
|
||||
"edition": "octane"
|
||||
},
|
||||
"release-it": {
|
||||
"plugins": {
|
||||
"release-it-lerna-changelog": {
|
||||
"infile": "CHANGELOG.md",
|
||||
"launchEditor": true
|
||||
}
|
||||
},
|
||||
"git": {
|
||||
"tagName": "v${version}"
|
||||
},
|
||||
"github": {
|
||||
"release": true,
|
||||
"tokenRef": "GITHUB_AUTH"
|
||||
},
|
||||
"npm": false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue