Skip to content

Commit

Permalink
chore(ci): add release-it-lerna-changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Dec 29, 2020
1 parent 1a912b0 commit 8118fde
Show file tree
Hide file tree
Showing 3 changed files with 1,213 additions and 31 deletions.
22 changes: 5 additions & 17 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
# Release Instructions

Follow these steps to create a new release:
1. Check that notable PRs since the last release are labeled and have clear and consistent titles

1) Check that notable PRs since the last release are labeled and have clear and consistent titles
2. `git pull` the latest master and ensure that `git status` shows no local changes

2) `git pull` the latest master and ensure that `git status` shows no local changes
3. `export GITHUB_AUTH="..."` with a [GitHub access token](https://github.com/settings/tokens/new?scopes=repo&description=release-it) with "repo" access so [release-it](https://github.com/release-it/release-it) can conduct a GitHub release and [lerna-changelog](https://github.com/lerna/lerna-changelog) can download the change history

3) `lerna-changelog` – generates the changelog for the new release
4. `export EDITOR="vim"` to choose an editor for editing the changelog

4) Add the generated changelog to `CHANGELOG.md` (with a new version number)

5) `git commit -am "Update CHANGELOG"`

6) `yarn version` – updates the `version` property in the `package.json` file and creates a new git commit and tag for the release (note: do not update the version manually prior to running this command)

7) `git push upstream master --follow-tags` – pushes the release commit and tag to the `upstream` remote

8) Use GitHub to [publish](https://github.com/ember-cli/eslint-plugin-ember/releases/new) a new release for the pushed tag using the generated changelog (without the changelog title) as the description

9) `npm pack`

10) `npm publish`
5. `yarn release` (uses [release-it-lerna-changelog](https://github.com/rwjblue/release-it-lerna-changelog) to handle versioning, the changelog, publishing to GitHub and NPM, etc)
22 changes: 21 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"lint:docs": "markdownlint **/*.md",
"lint:js": "eslint . --cache",
"lint:package-json": "sort-package-json --check",
"release": "release-it",
"start": "yarn run test:watch",
"test": "jest",
"test:coverage": "jest --coverage",
Expand Down Expand Up @@ -77,10 +78,11 @@
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-unicorn": "^25.0.0",
"jest": "^26.4.2",
"lerna-changelog": "^1.0.1",
"markdownlint-cli": "^0.26.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.1.1",
"release-it": "^14.2.2",
"release-it-lerna-changelog": "^3.1.0",
"sort-package-json": "^1.44.0"
},
"peerDependencies": {
Expand All @@ -89,6 +91,9 @@
"engines": {
"node": "10.* || 12.* || >= 14"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"changelog": {
"repo": "ember-cli/eslint-plugin-ember",
"labels": {
Expand All @@ -98,5 +103,20 @@
"documentation": ":memo: Documentation",
"internal": ":house: Internal"
}
},
"release-it": {
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
Loading

0 comments on commit 8118fde

Please sign in to comment.