From 649b0118663d861d9a10524a1da0ddd09e5b1d9a Mon Sep 17 00:00:00 2001 From: "Ahmed T. Ali" Date: Thu, 2 Nov 2017 19:39:35 +0200 Subject: [PATCH] build: setup semantic-release --- .travis.yml | 13 +++++++++---- package.json | 9 ++++++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index b45b5d2..a6a17cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,18 @@ -sudo: false language: node_js cache: directories: - - node_modules + - ~/.npm node_js: - - "8" + - '8' notifications: email: false - +before_script: + - npm prune +after_success: + - npm run semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ deploy: script: scripts/deploy.sh provider: script diff --git a/package.json b/package.json index 6b54f97..6f4c031 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "commitlint-bot", - "version": "0.0.0", + "version": "0.0.0-development", "description": "A GitHub App that runs commitlint for you", "author": "Ahmed T. Ali (https://ahmed.sd)", "license": "MIT", @@ -11,7 +11,9 @@ "now": "now", "now-start": "PRIVATE_KEY=$(echo $PRIVATE_KEY | base64 -d) npm start", "start": "probot run ./index.js", - "test": "mocha" + "test": "mocha", + "semantic-release": + "semantic-release pre && npm publish && semantic-release post" }, "dependencies": { "@commitlint/core": "^4.2.2", @@ -21,7 +23,8 @@ "expect": "^1.20.2", "localtunnel": "^1.8.2", "mocha": "^3.2.0", - "now": "^8.3.10" + "now": "^8.3.10", + "semantic-release": "^8.2.0" }, "engines": { "node": ">=8",