language: node_js
node_js:
  - '12'
  - '14'
install:
  - npm install
  - npm install -g codecov
script:
  - npm run build
  - npm t

jobs:
  include:
    - stage: npm release
      if: tag IS present
      node_js: '14'
      script: npm run build
      deploy:
        provider: npm
        email: '$NPM_EMAIL'
        api_key: '$API_TOKEN'
        skip_cleanup: true
        on:
          tags: true
