cz-deploy
v3.0.1
Published
Bunch of opinionated tools for releasing packages workflow
Downloads
9
Maintainers
Readme
cz-deploy
Bunch of opinionated tools for releasing packages workflow
Installation
yarn add -D cz-deploy
Usage
cz-deploy
assumes that you have master
and dev
branch
yarn cz-update-version
- updates version in package.json. If there are commits starting withbreaking
it will release a new major version, if there are commits starting withfeat
it will release a new minor version, otherwise a new patchyarn cz-commit [--chore=NAME] [--push] [--push-tags]
- addsv${version}
tag and commits current changes withchore(NAME): v${version}
message. Callscz-sync
ifpush
orpush-tags
args are providedyarn cz-sync [--push] [--push-tags]
- synchronizes and pushesdev
andmaster
branchesyarn cz-add-tag
- adds av${version}
tag (ex.v1.0.5
, version take from package.json file)yarn cz-lag-tag-commits
- prints the commits since the last tag
Example workflow - simple project
1. Add the following script to your package.json
{
"scripts": {
"release": "git diff --name-status --exit-code HEAD && yarn cz-update-version && yarn cz-commit --push --push-tags"
}
}
2. Be sure you're on dev
branch, commit all your changes, run yarn release
Example workflow - advances usage with testing/building stages and publishing to npm
1. Add the following script to your package.json
{
"scripts": {
"release": "git diff --name-status --exit-code HEAD && yarn test && yarn cz-update-version && yarn build && git add . && yarn cz-commit --chore=build+release --push --push-tags && npm publish",
"test": "YOUR_TEST_SCRIPT",
"build": "YOUR_BUILD_SCRIPT"
}
}