Skip to content

Commit

Permalink
ci(release): add npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
lgaticaq committed Aug 23, 2018
1 parent 4f6a98e commit e97186f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 27 deletions.
34 changes: 9 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
language: node_js

node_js: '8'

cache:
directories:
- $HOME/.npm

install:
- npm install

- ~/.npm
notifications:
email: false
node_js:
- '10'
- '8'
script:
- npm run prettier
- npm run lint

jobs:
include:
- stage: test
node_js: '8'
- stage: release
language: node_js
node_js: '8'
script:
- npm run semantic-release

stages:
- test
- name: release
if: branch = master AND type = push AND fork = false

after_success:
- npm run travis-deploy-once "npm run semantic-release"
branches:
except:
- /^v\d+\.\d+\.\d+$/
- /^v\d+\.\d+\.\d+$/
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"scripts": {
"lint": "eslint lib index.js",
"prettier": "prettier --write --list-different '**/*.js?(on)'",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release",
"travis-deploy-once": "travis-deploy-once"
},
"config": {
"commitizen": {
Expand All @@ -51,7 +52,8 @@
"eslint-plugin-standard": "^3.0.1",
"prettier": "1.12.1",
"semantic-release": "^15.9.9",
"validate-commit-msg": "^2.14.0"
"validate-commit-msg": "^2.14.0",
"travis-deploy-once": "^5.0.2"
},
"peerDependencies": {
"semantic-release": ">=11.0.0 <16.0.0"
Expand Down

0 comments on commit e97186f

Please sign in to comment.