From 7b0e4503ce0cadb86da677228ed5ac5128a6a986 Mon Sep 17 00:00:00 2001 From: Tom Kirkpatrick Date: Wed, 26 Apr 2017 12:41:41 +0200 Subject: [PATCH] ci: set up semantic-release --- README.md | 2 +- circle.yml | 5 +++++ package.json | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd9dc39..51e8ffb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ READONLY ============= -[![Circle CI](https://circleci.com/gh/fullcube/loopback-ds-readonly-mixin.svg?style=svg)](https://circleci.com/gh/fullcube/loopback-ds-readonly-mixin) [![Coverage Status](https://coveralls.io/repos/fullcube/loopback-ds-readonly-mixin/badge.svg?branch=master&service=github)](https://coveralls.io/github/fullcube/loopback-ds-readonly-mixin?branch=master) [![Dependencies](http://img.shields.io/david/fullcube/loopback-ds-readonly-mixin.svg?style=flat)](https://david-dm.org/fullcube/loopback-ds-readonly-mixin) +[![Circle CI](https://circleci.com/gh/fullcube/loopback-ds-readonly-mixin.svg?style=svg)](https://circleci.com/gh/fullcube/loopback-ds-readonly-mixin) [![Coverage Status](https://coveralls.io/repos/fullcube/loopback-ds-readonly-mixin/badge.svg?branch=master&service=github)](https://coveralls.io/github/fullcube/loopback-ds-readonly-mixin?branch=master) [![Dependencies](http://img.shields.io/david/fullcube/loopback-ds-readonly-mixin.svg?style=flat)](https://david-dm.org/fullcube/loopback-ds-readonly-mixin) [![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) This module is designed for the [Strongloop Loopback](https://github.com/strongloop/loopback) framework. diff --git a/circle.yml b/circle.yml index 1cd14e5..e669ada 100644 --- a/circle.yml +++ b/circle.yml @@ -4,3 +4,8 @@ machine: test: post: - npm run coverage +deployment: + master: + branch: master + commands: + - npm run semantic-release diff --git a/package.json b/package.json index c8a8a96..1c04056 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "loopback-ds-readonly-mixin", "description": "A mixin to enable loopback Model properties to be marked as readonly.", - "version": "1.1.0", + "version": "0.0.0-development", "main": "./lib/index.js", "author": "Tom Kirkpatrick @mrfelton", "contributors": [ @@ -32,7 +32,8 @@ "pretest": "npm run lint", "test": "NODE_ENV=test nyc --reporter=lcov --reporter=text --reporter=text-summary mocha test/*test.js", "test:watch": "npm run test -- -w", - "coverage": "nyc report --reporter=text-lcov | coveralls" + "coverage": "nyc report --reporter=text-lcov | coveralls", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "dependencies": { "debug": "^2.6.4", @@ -40,6 +41,7 @@ }, "devDependencies": { "chai": "^3.5.0", + "condition-circle": "^1.5.0", "coveralls": "^2.13.0", "dirty-chai": "^1.2.2", "eslint": "^2.11.1", @@ -51,6 +53,10 @@ "mocha": "^3.3.0", "nodemon": "^1.11.0", "nyc": "^10.2.0", + "semantic-release": "^6.3.2", "supertest": "^3.0.0" + }, + "release": { + "verifyConditions": "condition-circle" } }