Skip to content

Commit

Permalink
Update automated release setup.
Browse files Browse the repository at this point in the history
* Update release-it-lerna-changelog to latest
* Add `launchEditor` configuration
* Remove custom `git.changelog` script (handled by lerna-changelog now)
* Add `github.tokenRef` to use a single token
* Update `RELEASE.md`
  • Loading branch information
rwjblue committed Aug 17, 2020
1 parent 135b5e5 commit 2f6dc3a
Show file tree
Hide file tree
Showing 3 changed files with 523 additions and 745 deletions.
41 changes: 19 additions & 22 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ have been merged since the last release have been labeled with the appropriate
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 principles here is that changelogs are for humans, not machines.
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

Expand All @@ -30,36 +30,33 @@ When reviewing merged PR's the labels to be used are:

Once the prep work is completed, the actual release is straight forward:

* First ensure that you have `release-it` installed globally, generally done by
using one of the following commands:
* First, ensure that you have installed your projects dependencies:

```
# using https://volta.sh
volta install release-it
# using Yarn
yarn global add release-it
# using npm
npm install --global release-it
yarn install
```

* Second, ensure that you have installed your projects dependencies:
* 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.

```
# using yarn
yarn install
For instance:

# using npm
npm install
```
```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:
* And last (but not least 😁) do your release.

```
release-it
npx release-it
```

[release-it](https://github.com/release-it/release-it/) manages the actual
release process. It will prompt you through the process of choosing the version
number, tagging, pushing the tag and commits, etc.
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.
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"repository": "https://github.com/emberjs/ember-test-waiters",
"license": "MIT",
"author": "",
"main": "addon/@ember/test-waiters/index.ts",
"types": "index.d.ts",
"directories": {
"doc": "doc",
"test": "tests"
},
"main": "addon/@ember/test-waiters/index.ts",
"types": "index.d.ts",
"scripts": {
"build": "ember build",
"lint:js": "eslint --ext ts,js .",
Expand Down Expand Up @@ -68,7 +68,7 @@
"prettier": "^1.19.1",
"qunit": "^2.10.0",
"release-it": "^13.6.6",
"release-it-lerna-changelog": "^1.0.3",
"release-it-lerna-changelog": "^2.3.0",
"typescript": "~3.9.2"
},
"engines": {
Expand All @@ -84,15 +84,16 @@
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}",
"changelog": "git log --pretty=format:\"* %s (%h)\" --no-merges --perl-regexp --author=\"^((?!dependabot-preview).*)$\" ${latestTag}...HEAD"
"tagName": "v${version}"
},
"github": {
"release": true
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
Loading

0 comments on commit 2f6dc3a

Please sign in to comment.