|
| 1 | +# Release |
| 2 | + |
| 3 | +Releases are mostly automated using |
| 4 | +[release-it](https://github.com/release-it/release-it/) and |
| 5 | +[lerna-changelog](https://github.com/lerna/lerna-changelog/). |
| 6 | + |
| 7 | +## Preparation |
| 8 | + |
| 9 | +Since the majority of the actual release process is automated, the primary |
| 10 | +remaining task prior to releasing is confirming that all pull requests that |
| 11 | +have been merged since the last release have been labeled with the appropriate |
| 12 | +`lerna-changelog` labels and the titles have been updated to ensure they |
| 13 | +represent something that would make sense to our users. Some great information |
| 14 | +on why this is important can be found at |
| 15 | +[keepachangelog.com](https://keepachangelog.com/en/1.0.0/), but the overall |
| 16 | +guiding principle here is that changelogs are for humans, not machines. |
| 17 | + |
| 18 | +When reviewing merged PR's the labels to be used are: |
| 19 | + |
| 20 | +- breaking - Used when the PR is considered a breaking change. |
| 21 | +- enhancement - Used when the PR adds a new feature or enhancement. |
| 22 | +- bug - Used when the PR fixes a bug included in a previous release. |
| 23 | +- documentation - Used when the PR adds or updates documentation. |
| 24 | +- internal - Used for internal changes that still require a mention in the |
| 25 | + changelog/release notes. |
| 26 | + |
| 27 | +## Release |
| 28 | + |
| 29 | +Once the prep work is completed, the actual release is straight forward: |
| 30 | + |
| 31 | +- First, ensure that you have an environment variable with your GitHub token |
| 32 | + setup as `GITHUB_AUTH`. This token will be used for generating your changelog |
| 33 | + (unauthenticated requests to the GitHub API are heavily throttled) and for |
| 34 | + creating the GitHub release. Only "repo" access is needed; no "admin" |
| 35 | + or other scopes are required. |
| 36 | + |
| 37 | +- Next, ensure that you have installed your projects dependencies: |
| 38 | + |
| 39 | +``` |
| 40 | +pnpm install |
| 41 | +``` |
| 42 | + |
| 43 | +- And last (but not least 😁) do your release: |
| 44 | + |
| 45 | +``` |
| 46 | +pnpm release |
| 47 | +``` |
| 48 | + |
| 49 | +[release-it](https://github.com/release-it/release-it/) manages the actual |
| 50 | +release process. It will prompt you to to choose the version number after which |
| 51 | +you will have the chance to hand tweak the changelog to be used (for the |
| 52 | +`CHANGELOG.md` and GitHub release), then `release-it` continues on to tagging, |
| 53 | +pushing the tag and commits, etc. Finally GitHub Actions will build the commit |
| 54 | +and push the release to npm. |
| 55 | + |
| 56 | +### Credits |
| 57 | + |
| 58 | +Thie initial version of this document was copied from [ember-test-selectors](https://github.com/simplabs/ember-test-selectors/blob/master/RELEASE.md) |
0 commit comments