dependencies:
  override:
    - yarn
  cache_directories:
    - ~/.cache/yarn
machine:
  environment:
    PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
  node:
    version: 6.10.3
test:
  override:
    - yarn test
deployment:
  release:
    # release on tagged versions
    tag: /v[0-9]+(\.[0-9]+)*/
    owner: iopipe
    commands:
      - cp .npmrc-sample .npmrc
      - npm publish --access public
      # Remove this after 2018-05-01
      - sed -i 's/\@iopipe\/iopipe/iopipe/' package.json
      - npm publish --access public
      - git checkout package.json
