image: node:8.11.3 cache: untracked: true key: "$CI_BUILD_REF_NAME" paths: - node_modules/ stages: - install - lint - test - styleguide - pages - version - publish install: stage: install script: - yarn lint: stage: lint script: - yarn lint test: stage: test script: - yarn test styleguide: stage: styleguide only: - master script: - npm run styleguide:build artifacts: paths: - styleguide/ pages: stage: pages dependencies: - styleguide script: - mv styleguide/ public/ artifacts: paths: - public expire_in: 30 days only: - master version: stage: version when: manual only: - staging script: - git config user.name "GitLab CI" - git config user.email "gitlab-runner@sigfox.com" - npm version patch - git push publish: stage: publish when: manual only: - master script: - yarn build - echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' > .npmrc - npm publish