Newer
Older
---
## /* vim: set tabstop=2 softtabstop=2 shiftwidth=2 expandtab smarttab autoindent: */
image: "node:12.16.1"
cache:
paths:
- "node_modules/"
stages:
- build
- test
- deploy
- if: '$CI_MERGE_REQUEST_ID != null'
when: always
artifacts:
paths:
- "node_modules/"
- "dist/"
- "www/"
untracked: true
script:
- yarn "install" --immutable
test:
stage: test
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null'
when: on_success
- if: '$CI_MERGE_REQUEST_ID != null'
when: on_success
script:
- yarn "test"
deploy_npm:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TAG != null'
when: on_success
## Configure NPM with our token
- echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >"${HOME}/.npmrc"
- npm "publish" --access public