general:
  artifacts:
    - "extension/"
    - "apiary.crx"
    - "apiary.zip"

machine:
  node:
    version: 7.2.0

  hosts:
    api.xyz.com: 127.0.0.1
    console.apiary.dev: 127.0.0.1

dependencies:
  post:
    - echo 'NODE_ENV=CI' > .env && cd server && npm install
    - cd extension && echo $CHROME_EXTENSION_RSA_KEY > key.pem
    - cd client && echo 'NODE_ENV=CI' > .env && npm install

  cache_directories:
    - "server/node_modules"

test:
  pre:
    - npm run build:extension
    - cd server && npm start:
        background: true
    - npm start:
        background: true

deployment:
  production:
    branch: master
    commands:
      - npm run semantic-release || true
  post:
    - cd client && npm run prepublish

general:
  artifacts:
    - "extension/"
    - "apiary.crx"
    - "apiary.zip"

machine:
  node:
    version: 7.2.0

  hosts:
    api.xyz.com: 127.0.0.1
    console.apiary.dev: 127.0.0.1

dependencies:
  post:
    - echo 'NODE_ENV=CI' > .env && cd server && npm install
    - cd extension && echo $CHROME_EXTENSION_RSA_KEY > key.pem
    - cd client && echo 'NODE_ENV=CI' > .env && npm install
    - cd client && zip -u apiary.zip ../extension/key.pem

  cache_directories:
    - "server/node_modules"

test:
  pre:
    - npm run build:extension
    - cd server && npm start:
        background: true
    - npm start:
        background: true

deployment:
  production:
    branch: master
    commands:
      - npm run semantic-release || true
  post:
    - cd client && npm run prepublish

Put key file in the zip file
Put key file in the zip file
