GeezerVison is showing github.com — chore: Add release script · lerna/lerna@e00779a
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# GitHub token with "public_repo" scope required for --create-release=github | | 2 | +# @see https://github.com/settings/tokens | | 3 | +GH_TOKEN=REPLACEME |
Collapse file Copy file name to clipboardExpand all lines: .gitignore +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 29 | 29 | coverage/ | 30 | 30 | .nyc_output/ | 31 | 31 | .eslintcache | | 32 | +.env |
Collapse file Copy file name to clipboardExpand all lines: CONTRIBUTING.md +14Lines changed: 14 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -110,3 +110,17 @@ $ xdg-open coverage/lcov-report/index.html | 110 | 110 | ### Submitting Pull Requests | 111 | 111 |
| 112 | 112 | This project follows [GitHub's standard forking model](https://guides.github.com/activities/forking/). Please fork the project to submit pull requests. | | 113 | + | | 114 | +### Releasing | | 115 | + | | 116 | +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! | | 117 | + | | 118 | +You'll need to set up a local `.env` file in the repo root to provide the required environment variables. | | 119 | +The `.env.example` file is available in the root as a template. | | 120 | +The root `.env` file is _never_ placed under version control. | | 121 | + | | 122 | +Once that's done, run the release script and await glory: | | 123 | + | | 124 | +```sh | | 125 | +npm run release | | 126 | +``` |
Collapse file Copy file name to clipboardExpand all lines: lerna.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | "version": { | 8 | 8 | "allowBranch": "main", | 9 | 9 | "conventionalCommits": true, | | 10 | + "createRelease": "github", | 10 | 11 | "exact": true, | 11 | 12 | "message": "chore(release): %s" | 12 | 13 | } | |
Collapse file Copy file name to clipboardExpand all lines: package-lock.json +42Lines changed: 42 additions & 0 deletions Collapse file Copy file name to clipboardExpand all lines: package.json +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 | "utils/*" | 10 | 10 | ], | 11 | 11 | "scripts": { | | 12 | + "prerelease": "npm test && npm run integration", | | 13 | + "release": "env-cmd lerna version", | | 14 | + "postversion": "lerna publish from-git", | 12 | 15 | "ci": "npm test -- --ci --maxWorkers=2 && npm run integration -- --ci", | 13 | 16 | "ci:test:unit": "jest --config jest.config.js --maxWorkers=2 --ci", | 14 | 17 | "ci:test:integration": "jest --config jest.integration.js --maxWorkers=2 --ci", | | 129 | 132 | "@lerna-test/silence-logging": "file:helpers/silence-logging", | 130 | 133 | "@lerna-test/update-lerna-config": "file:helpers/update-lerna-config", | 131 | 134 | "debug": "^4.3.1", | | 135 | + "env-cmd": "^10.1.0", | 132 | 136 | "eslint": "^7.19.0", | 133 | 137 | "eslint-config-airbnb-base": "^14.2.1", | 134 | 138 | "eslint-config-prettier": "^7.2.0", | |
|