Skip to content

Commit

Permalink
Add automated release setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Nov 1, 2019
1 parent 34b8537 commit a78aabe
Show file tree
Hide file tree
Showing 4 changed files with 1,192 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ before_install:
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --no-lockfile
- yarn install --no-lockfile --ignore-engines

script:
- yarn lint
Expand Down
65 changes: 65 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Release

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 principles 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 `release-it` installed globally, generally done by
using one of the following commands:

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

* Second, ensure that you have installed your projects dependencies:

```
# using yarn
yarn install
# using npm
npm install
```

* And last (but not least 😁) do your release:

```
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.
28 changes: 23 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"keywords": [
"ember-addon"
],
"repository": {
"type": "git",
"url": "https://github.com/emberjs/ember-qunit.git"
},
"license": "MIT",
"contributors": [
"Stefan Penner",
Expand All @@ -16,10 +20,6 @@
"doc": "doc",
"test": "tests"
},
"repository": {
"type": "git",
"url": "https://github.com/emberjs/ember-qunit.git"
},
"scripts": {
"build": "ember build",
"changelog": "lerna-changelog",
Expand Down Expand Up @@ -56,14 +56,19 @@
"eslint-plugin-prettier": "^3.1.1",
"lerna-changelog": "^0.8.2",
"loader.js": "^4.2.3",
"prettier": "1.18.2"
"prettier": "1.18.2",
"release-it": "^12.2.1",
"release-it-lerna-changelog": "^1.0.3"
},
"resolutions": {
"**/engine.io": "~3.3.0"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"changelog": {
"repo": "emberjs/ember-qunit",
"labels": {
Expand All @@ -76,5 +81,18 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
}
}
}
Loading

0 comments on commit a78aabe

Please sign in to comment.