From af6bdcdddb5ff9c09d8f9928cef588d4817cd006 Mon Sep 17 00:00:00 2001 From: Leko Date: Mon, 13 Mar 2017 01:27:46 +0900 Subject: [PATCH] chore: Add deploy script --- circle.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index a4cf9c8..2ca8ce0 100644 --- a/circle.yml +++ b/circle.yml @@ -1,9 +1,24 @@ machine: node: version: 6.1.0 +dependencies: + pre: + - git config user.name Leko + - git config user.email $NPM_EMAIL + override: + - npm run build + post: + - sudo apt-get install -y jq test: pre: - npm run lint post: - - npm run build - bash <(curl -s https://codecov.io/bash) +deployment: + production: + branch: master + commands: + - echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login + - git tag $(jq -r .version package.json) + - git push origin $(jq -r .version package.json) + - npm publish