Skip to content

Commit

Permalink
ci: set up for circle ci and the latest semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmclaurin committed Nov 5, 2018
1 parent ddccdda commit 3e6edc7
Show file tree
Hide file tree
Showing 3 changed files with 2,957 additions and 451 deletions.
33 changes: 33 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 2
jobs:
build:
docker:
- image: circleci/node:latest

working_directory: ~/repo

steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn config set registry "https://registry.npmjs.org/"
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run: echo "registry=https://registry.npmjs.org/" >> ~/repo/.npmrc

- run:
name: yarn install
command: yarn --ignore-scripts
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run:
name: build
command: yarn run prepublish
- run:
name: release
command: yarn run semantic-release || true
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"prepush": "npm test",
"prepublish": "npm run lint && flow && npm test && npm run build",
"open:coverage": "open coverage/lcov-report/index.html",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
"semantic-release": "semantic-release"
},
"config": {
"mocha": "--compilers js:babel-core/register ./test/**/*.js",
Expand Down Expand Up @@ -65,6 +65,7 @@
"babel-runtime": "^6.23.0",
"chai": "^3.5.0",
"codecov": "^2.3.0",
"condition-circle": "^2.0.1",
"copy": "^0.3.0",
"eslint": "^3.15.0",
"eslint-plugin-flowtype": "^2.30.0",
Expand All @@ -77,6 +78,12 @@
"mocha": "^3.2.0",
"nyc": "^10.1.2",
"rimraf": "^2.6.0",
"semantic-release": "^8.2.0"
"semantic-release": "^15.10.7"
},
"publishConfig": {
"access": "public"
},
"release": {
"verifyConditions": "condition-circle"
}
}
Loading

0 comments on commit 3e6edc7

Please sign in to comment.