From 33b11016f5ecfc201a08ed57329e6a898d2ae6e1 Mon Sep 17 00:00:00 2001 From: Arthur Denner Date: Sat, 29 Feb 2020 19:13:46 +0100 Subject: [PATCH] ci(Travis): run validate script and semantic-release when master (#193) --- .lintstagedrc | 3 +-- .travis.yml | 16 ++++++++++++++-- package.json | 9 +++------ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.lintstagedrc b/.lintstagedrc index 03826583..9349dcce 100644 --- a/.lintstagedrc +++ b/.lintstagedrc @@ -1,6 +1,5 @@ { "*.{js,ts,json,md}": [ - "prettier --write", - "git add" + "prettier --write" ] } diff --git a/.travis.yml b/.travis.yml index 173b4446..cbd27aa5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,16 @@ language: node_js - +cache: + directories: + - ~/.npm +notifications: + email: false node_js: - - "node" + - '10' + - '11' + - '12' +script: npm run validate +after_success: + - test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = "false" && npx semantic-release +branches: + except: + - /^v\d+\.\d+\.\d+$/ diff --git a/package.json b/package.json index a11fd8f1..31b4005a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "use-lax", - "version": "3.1.0", + "version": "0.0.0-development", "description": "React hook to use with lax.js.", "main": "./dist/use-lax.cjs.js", "module": "./dist/use-lax.esm.js", @@ -17,15 +17,12 @@ "author": "Arthur Denner ", "scripts": { "add-contributor": "all-contributors add", - "prebuild": "rimraf dist types", "build": "rollup -c && tsc", - "preversion": "npm test", - "prepare": "npm run build", - "version": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md" + "validate": "npm run build" }, "repository": { "type": "git", - "url": "git+https://github.com/arthurdenner/use-lax.git" + "url": "https://github.com/arthurdenner/use-lax.git" }, "license": "MIT", "bugs": {