topcoder-react-lib
Version:
The implementation of TC lib for ReactJS projects
49 lines (47 loc) • 1.04 kB
YAML
defaults:
docker:
- image: circleci/node:8.11.2
version: 2
jobs:
test:
<<:
steps:
- checkout
- restore_cache:
key: node-modules-{{ checksum "package-lock.json" }}
- run: npm install
- save_cache:
key: node-modules-{{ checksum "package-lock.json" }}
paths:
- node_modules
- run: npm run build
- run: npm test
- persist_to_workspace:
root: .
paths:
- dist
release:
<<:
steps:
- checkout
- attach_workspace:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish
# dont change anything
workflows:
version: 2
build:
jobs:
- test:
filters:
tags:
only: /.*/
- release:
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-[0-9]+)?/
requires:
- test