image: node:10.15.0

pipelines:
  branches:      
    master:
      - step:
          name: Build and Deploy - PRODUCTION
          deployment: Production
          caches:
            - node
          script:
            - printf "//`node -p \"require('url').parse(process.env.NPM_REGISTRY_URL || 'https://registry.npmjs.org').host\"`/:_authToken=${NPM_TOKEN}\nregistry=${NPM_REGISTRY_URL:-https://registry.npmjs.org}\n" >> ~/.npmrc
            - npm install
            - npm version patch --force
            - npm publish