-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`npx create-rwjblue-release-it-setup` 🎉
- Loading branch information
Showing
3 changed files
with
1,429 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,60 @@ | ||
# Release Process | ||
|
||
The following details how to perform a release for `ember-exam`. | ||
Releases are mostly automated using | ||
[release-it](https://github.com/release-it/release-it/) and | ||
[lerna-changelog](https://github.com/lerna/lerna-changelog/). | ||
|
||
## Update Changelog | ||
## Preparation | ||
|
||
First, we need to update the changelog using [`git-extras`](https://github.com/tj/git-extras). | ||
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. | ||
|
||
```bash | ||
git changelog | ||
``` | ||
When reviewing merged PR's the labels to be used are: | ||
|
||
Be sure to cleanup the changelog by removing merge commits or any commits that don't provide meaningful information. Then, commit the changes with the following message: | ||
* 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. | ||
|
||
```bash | ||
git commit -am "Update changelog for vx.x.x" | ||
``` | ||
## Release | ||
|
||
## Tag A New Version | ||
Once the prep work is completed, the actual release is straight forward: | ||
|
||
Next, we need to tag the new version. We do this using the built in `npm` command: | ||
* First, ensure that you have installed your projects dependencies: | ||
|
||
```bash | ||
npm version x.x.x | ||
```sh | ||
yarn install | ||
``` | ||
|
||
Then, we push the new commits and tag to the repo: | ||
* 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. | ||
|
||
``` | ||
git push origin master --tags | ||
``` | ||
For instance: | ||
|
||
## Publish The New Version | ||
```bash | ||
export GITHUB_AUTH=abc123def456 | ||
``` | ||
|
||
Almost there! We now publish the new version using: | ||
[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable | ||
|
||
```bash | ||
npm publish | ||
``` | ||
|
||
## Update release notes | ||
* And last (but not least 😁) do your release. | ||
|
||
Finally, publish the [release on GitHub](https://github.com/ember-cli/ember-exam/releases) by drafting a new release. Use the changelog to populate the entry. | ||
```sh | ||
npx release-it | ||
``` | ||
|
||
And that's it! Congratulations! | ||
[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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.