Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update automated release steps #90

Merged
merged 1 commit into from
Aug 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 27 additions & 6 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ have been merged since the last release have been labeled with the appropriate
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.
guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

Expand All @@ -30,12 +30,33 @@ When reviewing merged PR's the labels to be used are:

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:

```
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.
* 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.

```
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.
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
},
"license": "MIT",
"author": "Robert Jackson <me@rwjblue.com>",
"files": [
"src",
"bin",
"commands"
],
"main": "src/index.js",
"bin": {
"codemod-cli": "./bin/cli.js"
},
"directories": {
"test": "tests"
},
"files": [
"src",
"bin",
"commands"
],
"scripts": {
"lint": "eslint .",
"lint:js": "eslint .",
Expand Down Expand Up @@ -60,8 +60,8 @@
"jest": "^24.9.0",
"prettier": "^1.18.2",
"qunit": "^2.9.2",
"release-it": "^12.4.1",
"release-it-lerna-changelog": "^1.0.3",
"release-it": "^13.6.5",
"release-it-lerna-changelog": "^2.3.0",
"require-so-slow": "^1.2.0",
"walk-sync": "^2.0.2"
},
Expand All @@ -74,14 +74,16 @@
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md"
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
Loading