README
:point_right: Live Storybook preview :point_left:
Contents:
Guidelines
Code Approval & QA before deployment
- Make sure you are up to date with master branch:
git checkout master
git pull origin master
git checkout <YOUR_WORKING_BRANCH>
git rebase master
- Create a pull request into
master
- Get QA approval from Product Design: run storybook locally and demo to designer
- Get pull request approved: notify all teams of any updated components
- Merge your PR into master
Deployment
- Make sure you are up to date with master branch:
git checkout master
git pull origin master
- Check that all CI steps pass (no errors etc):
yarn lint
yarn test
yarn start
(make sure that storybook is working as expected)yarn build
(generate the new bundle, making sure there are no errors)npm version major|minor|patch
.- If you are just adding or updating new components and/or stories, you need to bump minor version as:
npm version minor
. This will automatically increment the version and creates a new version (unpushed) commit. Read more aboutsemver (Semantic Versioning)
When not clear what to do, ask in the channel:#design-system
.
- If you are just adding or updating new components and/or stories, you need to bump minor version as:
- Run
yarn build
one more time. This is because as we just updated the package version in above command, we need to generate a fresh build to get that updated version value into the build. npm publish
(will publish to the npm registry)- Push version commit to master:
- If you have a permission to push directly to master, run:
git push origin master
- If you don't have that permission or if above command fails due to some reason, create a new branch out of that version commit and push as following steps:
- run:
git log
to get the commit message sha hash. This should be the first commit in the list. - Create branch as:
git branch <BRANCH_NAME> <SHA_HASH_OF_COMMIT>
- This branch has already the version commit, so just push it:
git push
- Get it approved and merge this branch into master.
- run:
- If you have a permission to push directly to master, run:
yarn build
(generate the new bundle)- Create tag with latest version of the package:
git tag <VERSION_NUMBER_IN_PACKAGE_JSON>
git push origin <VERSION_NUMBER_IN_PACKAGE_JSON>
- Deploy storybook to Github Pages:
yarn deploy:storybook