Skip to content

Commit

Permalink
Setup release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed Jun 20, 2023
1 parent 1d51144 commit 76f41c6
Show file tree
Hide file tree
Showing 4 changed files with 1,235 additions and 48 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Changelog
60 changes: 60 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -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.
52 changes: 31 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
"name": "@ember-cli-deploy/ember-cli-deploy-compress",
"version": "0.4.0",
"description": "Ember CLI Deploy plugin to compress files in gzip or brotli automatically depending on supported browsers (forked from Dockyard)",
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-compress",
"license": "MIT",
"author": "Miguel Camba",
"directories": {
"doc": "doc",
"test": "tests"
Expand All @@ -10,12 +17,14 @@
"release": "release-it",
"test": "mocha tests && eslint index.js tests/**/*.js"
},
"repository": "https://github.com/ember-cli-deploy/ember-cli-deploy-compress",
"engines": {
"node": "14.* || 16.* || 18.* || >= 20.*"
"dependencies": {
"caniuse-api": "^2.0.0",
"chalk": "^1.1.3",
"core-object": "^2.1.1",
"ember-cli-deploy-plugin": "^0.2.9",
"minimatch": "^3.1.2",
"rsvp": "^3.6.2"
},
"author": "Miguel Camba",
"license": "MIT",
"devDependencies": {
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
Expand All @@ -27,28 +36,22 @@
"mocha": "^5.2.0",
"multiline": "^1.0.2",
"node-zopfli-es": "^2.0.2",
"npm": "^9.7.1",
"release-it": "14.11.8",
"release-it-lerna-changelog": "^3.1.0",
"release-it-lerna-changelog": "~3.1.0",
"rimraf": "^2.3.4"
},
"keywords": [
"ember-addon",
"ember-cli-deploy-plugin"
],
"dependencies": {
"caniuse-api": "^2.0.0",
"chalk": "^1.1.3",
"core-object": "^2.1.1",
"ember-cli-deploy-plugin": "^0.2.9",
"minimatch": "^3.1.2",
"rsvp": "^3.6.2"
},
"ember-addon": {
"configPath": "tests/dummy/config"
"engines": {
"npm": "9.7.1",
"node": "14.* || 16.* || 18.* || >= 20.*"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
Expand All @@ -57,10 +60,17 @@
}
},
"git": {
"tagName": "v${version}",
"requireCleanWorkingDir": false
},
"github": {
"release": true
"release": true,
"tokenRef": "GITHUB_AUTH"
}
},
"volta": {
"node": "16.20.1",
"yarn": "3.6.0-git.20230603.hash-3c8237cb",
"npm": "9.7.1"
}
}
Loading

0 comments on commit 76f41c6

Please sign in to comment.