From 94a176e48c111253c30b351f93c8d358ef6ee82c Mon Sep 17 00:00:00 2001 From: Ritesh Kumar Date: Sat, 25 Feb 2017 22:38:24 +0530 Subject: [PATCH] build(semantic-release): set up automatic publish --- .travis.yml | 20 ++++++++++---------- package.json | 8 +++++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e193b2..ed927ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,20 +1,20 @@ -sudo: false language: node_js cache: directories: - node_modules notifications: email: false -# whitelist -branches: - only: - - master - - es6 node_js: - - iojs + - '7' + - '6' + - '4' +before_script: + - npm prune before_install: - npm i -g grunt-cli - - npm i -g npm@^2.0.0 - npm i -g rollup -before_script: - - npm prune +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index 8c16b09..bf36dae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "embed-js", - "version": "4.1.15", + "version": "0.0.0-development", "description": "A JavaScript plugin that analyses the string and embeds emojis, media, tweets, code and services.", "keywords": [ "JavaScript-plugin", @@ -85,14 +85,16 @@ "rollup-plugin-commonjs": "^7.0.0", "rollup-plugin-filesize": "^1.0.1", "rollup-plugin-node-resolve": "^2.0.0", - "rollup-plugin-uglify": "^1.0.1" + "rollup-plugin-uglify": "^1.0.1", + "semantic-release": "^6.3.2" }, "scripts": { "commit": "git-cz", "lint": "eslint src/js/**/*.js", "lintfix": "eslint --fix src/js/**/*.js", "test": "ava test/**/*.test.js --require babel-register", - "build": "rollup -c rollup.umd.config.js && rollup.es2015.config.js" + "build": "rollup -c rollup.umd.config.js && rollup.es2015.config.js", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "config": { "commitizen": {