Skip to content

Commit

Permalink
chore: Add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Feb 10, 2021
1 parent 255c2ea commit e00779a
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env.example
@@ -0,0 +1,3 @@
# GitHub token with "public_repo" scope required for --create-release=github
# @see https://github.com/settings/tokens
GH_TOKEN=REPLACEME
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,3 +29,4 @@ tmp
coverage/
.nyc_output/
.eslintcache
.env
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -110,3 +110,17 @@ $ xdg-open coverage/lcov-report/index.html
### Submitting Pull Requests

This project follows [GitHub's standard forking model](https://guides.github.com/activities/forking/). Please fork the project to submit pull requests.

### Releasing

If you are a member of Lerna's [GitHub org](https://github.com/orgs/lerna/people) and have read-write privileges in Lerna's [npm org](https://www.npmjs.com/org/lerna) _with 2-factor auth enabled_, congratulations, you can cut a release!

You'll need to set up a local `.env` file in the repo root to provide the required environment variables.
The `.env.example` file is available in the root as a template.
The root `.env` file is _never_ placed under version control.

Once that's done, run the release script and await glory:

```sh
npm run release
```
1 change: 1 addition & 0 deletions lerna.json
Expand Up @@ -7,6 +7,7 @@
"version": {
"allowBranch": "main",
"conventionalCommits": true,
"createRelease": "github",
"exact": true,
"message": "chore(release): %s"
}
Expand Down
42 changes: 42 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions package.json
Expand Up @@ -9,6 +9,9 @@
"utils/*"
],
"scripts": {
"prerelease": "npm test && npm run integration",
"release": "env-cmd lerna version",
"postversion": "lerna publish from-git",
"ci": "npm test -- --ci --maxWorkers=2 && npm run integration -- --ci",
"ci:test:unit": "jest --config jest.config.js --maxWorkers=2 --ci",
"ci:test:integration": "jest --config jest.integration.js --maxWorkers=2 --ci",
Expand Down Expand Up @@ -129,6 +132,7 @@
"@lerna-test/silence-logging": "file:helpers/silence-logging",
"@lerna-test/update-lerna-config": "file:helpers/update-lerna-config",
"debug": "^4.3.1",
"env-cmd": "^10.1.0",
"eslint": "^7.19.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^7.2.0",
Expand Down

0 comments on commit e00779a

Please sign in to comment.