Skip to content

Commit

Permalink
Merge pull request #125 from ember-fastboot/add-automated-release-setup
Browse files Browse the repository at this point in the history
Add release automation.
  • Loading branch information
rwjblue committed Oct 26, 2020
2 parents 375e44c + c99bd6a commit ddd742b
Show file tree
Hide file tree
Showing 3 changed files with 2,212 additions and 65 deletions.
60 changes: 60 additions & 0 deletions RELEASE.md
@@ -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.
50 changes: 35 additions & 15 deletions package.json
Expand Up @@ -2,29 +2,26 @@
"name": "fastboot-app-server",
"version": "2.0.0",
"description": "A production-ready app server for running Ember FastBoot apps",
"main": "src/fastboot-app-server.js",
"scripts": {
"lint:js": "eslint --cache .",
"test": "yarn lint:js && NODE_ENV=test mocha"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ember-fastboot/fastboot-app-server.git"
},
"engines": {
"node": "10.* || 12.* || >= 14"
},
"keywords": [
"ember",
"fastboot",
"server"
],
"author": "Tom Dale <tom@tomdale.net>",
"license": "MIT",
"homepage": "https://github.com/ember-fastboot/fastboot-app-server#readme",
"bugs": {
"url": "https://github.com/ember-fastboot/fastboot-app-server/issues"
},
"homepage": "https://github.com/ember-fastboot/fastboot-app-server#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ember-fastboot/fastboot-app-server.git"
},
"license": "MIT",
"author": "Tom Dale <tom@tomdale.net>",
"main": "src/fastboot-app-server.js",
"scripts": {
"lint:js": "eslint --cache .",
"test": "yarn lint:js && NODE_ENV=test mocha"
},
"dependencies": {
"basic-auth": "^2.0.0",
"chalk": "^2.0.1",
Expand All @@ -39,7 +36,30 @@
"eslint-plugin-mocha": "^6.3.0",
"eslint-plugin-node": "^11.1.0",
"mocha": "^5.0.0",
"release-it": "^14.2.0",
"release-it-lerna-changelog": "^3.0.0",
"request": "^2.81.0",
"request-promise": "^4.2.1"
},
"engines": {
"node": "10.* || 12.* || >= 14"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}

0 comments on commit ddd742b

Please sign in to comment.