Skip to content

Commit 9365da2

Browse files
committed
chore: document the release process
1 parent fbd18b2 commit 9365da2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,34 @@ The documentation for the project is under `docs` directory. To run the document
4949
yarn docs dev
5050
```
5151

52+
## Publishing
53+
54+
Maintainers with write access to the GitHub repo and the npm organization can publish new versions. To publish a new version, first, you need to export a `GH_TOKEN` environment variable as mentioned [here](https://github.com/lerna-lite/lerna-lite/blob/main/packages/version/README.md#remote-client-auth-tokens). Then run:
55+
56+
```sh
57+
yarn lerna publish
58+
```
59+
60+
This will automatically bump the version and publish the packages. It'll also publish the changelogs on GitHub for each package.
61+
62+
When releasing a pre-release version, we need to:
63+
64+
- Update `lerna.json` to set the `preId` (e.g. `next`) and `preDistTag` (e.g. `next`) fields, and potentially the `allowBranch` field.
65+
- Run the following command:
66+
67+
```sh
68+
yarn lerna publish --preid next
69+
```
70+
71+
When releasing a stable version, we need to:
72+
73+
- Remove the `preId` and `preDistTag` fields from `lerna.json`.
74+
- Run the following command:
75+
76+
```sh
77+
yarn lerna publish --conventional-commits --conventional-graduate
78+
```
79+
5280
## Acknowledgments
5381

5482
Thanks to the authors of these libraries for inspiration:

0 commit comments

Comments
 (0)