There is so many repeated steps when releasing a new version of a library. The tool Semantic-release automates this process by pushing off the responsibility of your releases to continuous Integrat Ion. Trust us, this would change your workflow for the better.
Install:
NPM i-d Semantic-release
Run:
SEMANTIC-RELEASE-CLI Setup
You can choose Travis and a single Node instance for now.
Notice Semantic release require Travis account (if you choose to use Travis), so you need to create a Travis account with Your Github account. So it'll sync your repos. After this is done. You can setup semantic release.
Semantic release would delete "version" from the Package.json, it would auto handle version according to your commit.
Also it creates a travis.yml file, you can add script to make sure it runs test before it commits.
sudo: false language:node_jscache: Directories: - Node_modulesnotifications:email: false node_js: - " 5.8 " before_install: -NPM i-g [ Email protected]^2.0 . 0 before_script: - NPM prunescript: - NPM run Test:single after_success: -npm run Semantic-releasebranches: Except: -/^v\d+\.\d+\.\d+$/
Script in Package.json:
" Test:single " " cross-env node_env=test Karma start--single-run " , " Semantic-release " " semantic-release pre && NPM publish && Semantic-release post "
[Javascript] Automating releases with Semantic-release