There are 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 integration. Trust us, this will change your workflow for the better.

Install:

npm i -D semantic-release

Run:

semantic-release-cli setup

You can choose Travis and 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 will sync your repos. After this done. you can setup semantic release.

Semantic release will delete "version" from the package.json, it will 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_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- '5.8'
before_install:
- npm i -g npm@^2.0.
before_script:
- npm prune
script:
- npm run test:single
after_success:
- npm run semantic-release
branches:
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的更多相关文章

  1. [Javascript] Log Levels and Semantic Methods

    Go beyond console.log by learning about log levels, filtering log output and structuring your output ...

  2. Sentry(v20.12.1) K8S 云原生架构探索,SENTRY FOR JAVASCRIPT SDK 配置详解

    系列 Sentry-Go SDK 中文实践指南 一起来刷 Sentry For Go 官方文档之 Enriching Events Snuba:Sentry 新的搜索基础设施(基于 ClickHous ...

  3. Sentry(v20.12.1) K8S 云原生架构探索,SENTRY FOR JAVASCRIPT Source Maps 详解

    系列 Sentry-Go SDK 中文实践指南 一起来刷 Sentry For Go 官方文档之 Enriching Events Snuba:Sentry 新的搜索基础设施(基于 ClickHous ...

  4. 07 Go 1.7 Release Notes

    Go 1.7 Release Notes Introduction to Go 1.7 Changes to the language Ports Known Issues Tools Assembl ...

  5. Long-term stable release maintenance

    http://en.wikipedia.org/wiki/Linux_kernel 2014.5.28 2.6.32 2 December 2009[122] 2.6.32.62[123] Willy ...

  6. Go命令官方指南【原译】

    启动错误报告 编译包和依赖项 删除目标文件和缓存的文件 显示包或符号的文档 打印Go环境信息 更新包以使用新API Gofmt(重新格式化)包源 通过处理源生成Go文件 下载并安装包和依赖项 编译并安 ...

  7. ubuntu 14.04中安装 ruby on rails 环境

    环境:在win7 上Vmware虚拟机环境中安装的ubuntu 14.04 1. bundle install 时,报json错误可以看出是在安装nokogiri时遇到了问题,此时执行 sudo ap ...

  8. Django 2.0.1 官方文档翻译: 文档目录 (Page 1)

    Django documentation contents 翻译完成后会做标记. 文档按照官方提供的内容一页一页的进行翻译,有些内容涉及到其他节的内容,会慢慢补上.所有的翻译内容按自己的理解来写,尽量 ...

  9. 内核升极2.6.18 升级到 2.6.32 装systemtap 原创

    系统: redhat serever 5.3  linux 2.6.18 现在要升级到 LINUX 内核 2.6.32 安装步骤: 1.下载装源代码: https://www.kernel.org/ ...

随机推荐

  1. 《find技巧》-“linux命令五分系列”之一

    一天一个命令,做个记录, 我要成大神,哈哈哈 本原创文章属于<Linux大棚>博客. 博客地址为http://roclinux.cn. 文章作者为roc 希望您能通过捐款的方式支持Linu ...

  2. Java学习----对象与对象之间的关系

    1.依赖 对象之间最弱的一种关联方式,是临时性的关联.代码中一般指由局部变量,函数参数,返回值建立的对于其他对象的调用关系. public class A { // 方法一 public void t ...

  3. Mysql访问 for橙子小海

    package com.mvc.model.dao; import com.mvc.model.daoutil.DBConn; import com.mvc.model.entity.Blog; 这是 ...

  4. Python开发【第一章】:Python简介和入门

    Python简介 Python的创始人为Guido van Rossum.1989年圣诞节期间,在阿姆斯特丹,Guido为了打发圣诞节的无趣,决心开发一个新的脚本解释程序,做为ABC 语言的一种继承. ...

  5. 那些年被我坑过的Python——第十章Broker(rabbitMQ/redis)

    基于RabbitMQ的direct任务驱动异步RPC程序实现: RPC_dispatcher指令分发器: #!/usr/bin/env python # -*- coding:utf-8 -*- __ ...

  6. 研究不定数量参数的函数并实现一个printf函数

    一.前提知识 1.如何传递参数(主函数) a.函数的参数是通过栈传递,而且是从右到左依次入栈 b.即使是char型变量,在传递参数时,也是占用两个字节,因为push操作是两个字节为单位的. c.sho ...

  7. DevOps - Development And Operations

    简介: 研发运维一体化 相关资料: 关于DevOps你必须知道的11件事 我眼中的DevOps DevOps 门户 docker for dotnet系列 docker4dotnet #1 前世今生 ...

  8. Unity网络斗地主 服务端

    Unity网络斗地主  服务端 @by梦想之家2工作室 阿龙 已经做好了服务器框架,并且能实现服务器给客户端分牌的问题!

  9. delphi OnMouseLeave 事件不灵敏及解决之道(使用TrackMouseEvent函数进行加强)

    http://topic.csdn.net/t/20020104/09/456913.html CM_MouseLeave消息好象不太灵敏,当鼠标快速移出窗体时,就收不到这个消息,请问大家有什么好办法 ...

  10. TWinControl的DoubleBuffered属性的作用与举例

    留个爪,网上搜一篇,仔细分析一下.