Skip to content

Commit

Permalink
Add automated release setup.
Browse files Browse the repository at this point in the history
release-it requires Node 8+, so I added `--ignore-engines` to
installation in CI until we drop Node 6 support.
  • Loading branch information
rwjblue committed Jun 17, 2019
1 parent 61f65e7 commit 321743b
Show file tree
Hide file tree
Showing 4 changed files with 1,066 additions and 57 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -37,12 +37,15 @@ jobs:
node_js: 8

- name: 'Floating Dependencies'
install: yarn install --no-lockfile --non-interactive
install: yarn install --no-lockfile --non-interactive --ignore-engines

before_install:
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH=$HOME/.yarn/bin:$PATH

install:
- yarn install --ignore-engines

script:
- yarn test

Expand Down
41 changes: 41 additions & 0 deletions RELEASE.md
@@ -0,0 +1,41 @@
# 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:

```
yarn install
yarn release
```

The `release` script leverages
[release-it](https://github.com/release-it/release-it/) to do the mechanical
release process. It will prompt you through the process of choosing the version
number, tagging, pushing the tag and commits, etc.
35 changes: 27 additions & 8 deletions package.json
Expand Up @@ -3,9 +3,9 @@
"version": "7.7.3",
"description": "Ember CLI addon for Babel",
"keywords": [
"ember-addon",
"babel",
"ember",
"ember-addon",
"ember-cli",
"transpile",
"transpiler"
Expand All @@ -14,6 +14,10 @@
"bugs": {
"url": "https://github.com/babel/ember-cli-babel/issues"
},
"repository": {
"type": "git",
"url": "git://github.com/babel/ember-cli-babel.git"
},
"license": "MIT",
"author": "Gordon Kristan",
"files": [
Expand All @@ -24,19 +28,16 @@
"doc": "doc",
"test": "tests"
},
"repository": {
"type": "git",
"url": "git://github.com/babel/ember-cli-babel.git"
},
"scripts": {
"build": "ember build",
"changelog": "lerna-changelog",
"lint:js": "eslint ./*.js addon addon-test-support app blueprints config lib server test-support tests",
"release": "release-it",
"start": "ember serve",
"test:node": "mocha node-tests",
"test:node:debug": "mocha debug node-tests",
"test": "mocha node-tests && ember test",
"test:all": "mocha node-tests && ember try:each"
"test:all": "mocha node-tests && ember try:each",
"test:node": "mocha node-tests",
"test:node:debug": "mocha debug node-tests"
},
"dependencies": {
"@babel/core": "^7.0.0",
Expand Down Expand Up @@ -86,11 +87,16 @@
"lerna-changelog": "^0.8.0",
"loader.js": "^4.7.0",
"mocha": "^5.2.0",
"release-it": "^12.2.1",
"release-it-lerna-changelog": "^1.0.3",
"resolve": "^1.8.1"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"changelog": {
"repo": "babel/ember-cli-babel",
"labels": {
Expand All @@ -103,5 +109,18 @@
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
}
}
}

0 comments on commit 321743b

Please sign in to comment.