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

release md v1 #370

Merged
merged 16 commits into from
Aug 10, 2022
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ If Storybook is not enough, you can additionaly run `npm start:example` which wi

# How to release?

You need to be a member of @livechat organization on npm. Then after authorization (`npm login`) you can publish packages into npm registry.

To bump package versions and publish them into registry please run `npm run deploy`.
We have entire document about that take a look [here](./RELEASE.md).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We have entire document about that take a look [here](./RELEASE.md).
Release process is described [here](./RELEASE.md). By default `@livechat` organization members are maintainers and have required permissions.

32 changes: 32 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
**Design system - build and deploy HOWTO**

To deploy a package to the npm you need to be logged in to an npm in your console. To confirm that you are logged in, you can use `npm whoami`. If you are not, use `npm login` and follow the instructions.

To deploy you just have to do 'npm run deploy'. It will execute several commands you can run separately if you wish, namely:
MichalPaszowski marked this conversation as resolved.
Show resolved Hide resolved

- 'check' - fire up linter and unit tests that are provided per package
- 'prettier' - format the code across the packages
- 'predeploy' - clean up old dist files and build new ones.
- and finally deploy files to npm.
sgraczyk marked this conversation as resolved.
Show resolved Hide resolved

When deploying to npm you will have to decide how to version your changes. Currently we are on the verge of deploying first mayor version of DS and because of that we use following convention `1.0.0-alpha.xx` where `xx` is the revision of current build. After release we will follow SemVer.

Example:

1 Choose "Custom Prerelease"
<img width="456" alt="lerna1" src="https://user-images.githubusercontent.com/7773964/182622782-a09b3cce-58a2-4d92-9eef-7dbf56ee3a44.png">
2 Accept suggested version
<img width="574" alt="lerna2" src="https://user-images.githubusercontent.com/7773964/182622849-779ae83b-1943-44fd-b2de-6619700c8540.png">
3 Confirm
<img width="680" alt="lerna3" src="https://user-images.githubusercontent.com/7773964/182622918-ee484e9e-8237-422a-8252-05f02a0332b1.png">

**Keep in mind that package won't be versioned if it is not changed, and changed package will catch up with other packages in versioning.** For example current version of package `react-components` is `1.0.0-alpha.17` but `icons` lag behind a bit and are at `1.0.0-alpha.15` because no changes has been made since two deploys. If you make some changes in `react-components` and in `icons` both packages will get `1.0.0-alpha.18` version.

On Github add release with correct version and change log.

- Tag is added automatically by lerna, remember to target `v1` branch.
- Title can be set to 'What's Changed'.
- In the change log mention packages changed and link the pull requests that are part of a release. Please follow the style used for previous releases (including author, PR, issue, and title info).

Example of correctly filled release note:
<img width="894" alt="correct_release" src="https://user-images.githubusercontent.com/7773964/182624431-232d6cea-9d0c-4455-afd9-365c88a1ab57.png">
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test:watch": "lerna run test:watch --parallel",
"prettier": "prettier --write packages",
"check": "run-s lint test",
"predeploy": "npm run build",
"predeploy": "npm run check && npm run prettier && npm run build",
"deploy": "lerna version && lerna publish from-package"
},
"repository": {
Expand Down
Loading