From c3e34eccf325a9b84dbb8796d40a66721319353f Mon Sep 17 00:00:00 2001 From: Klaus Trainer Date: Tue, 30 Aug 2016 21:47:07 +0200 Subject: [PATCH] feat: use semantic-release --- .travis.yml | 24 +++++++++++++++++++++--- package.json | 10 +++++++--- readme.markdown | 1 + 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 56c2d58..eca7a82 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,23 @@ +sudo: false language: node_js +cache: + directories: + - node_modules +notifications: + email: false node_js: - - 4 - - 5 - - 6 + - '4' + - '5' + - '6' +before_install: + - npm i -g npm@^2.0.0 +before_script: + - npm prune +after_success: + - 'curl -Lo travis_after_all.py https://git.io/travis_after_all' + - python travis_after_all.py + - export $(cat .to_export_back) &> /dev/null + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index ca3cdd3..bbdcd4d 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "snappy-msgpack-stream", - "version": "1.0.6", "description": "Streams of framed Snappy-compressed MessagePack messages", "main": "index.js", "scripts": { - "test": "standard && tape test.js" + "test": "standard && tape test.js", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "dependencies": { "bops": "^1.0.0", @@ -23,10 +23,14 @@ "license": "MIT", "devDependencies": { "standard": "^8.0.0", - "tape": "^4.6.0" + "tape": "^4.6.0", + "semantic-release": "^4.3.5" }, "repository": { "type": "git", "url": "https://github.com/KlausTrainer/snappy-msgpack-stream.git" + }, + "release": { + "branch": "main" } } diff --git a/readme.markdown b/readme.markdown index 8eefb7a..2a98ce0 100644 --- a/readme.markdown +++ b/readme.markdown @@ -2,6 +2,7 @@ [![Build Status](https://travis-ci.org/KlausTrainer/snappy-msgpack-stream.svg?branch=main)](https://travis-ci.org/KlausTrainer/snappy-msgpack-stream) [![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) +[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) Streams of framed [Snappy](https://google.github.io/snappy/)-compressed [MessagePack](http://msgpack.org/) messages..