[Javascript] Automating releases with Semantic-release

Source: Internet
Author: User

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.


NPM i-d Semantic-release



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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.