g-chartframe
Version:
FT styled frames for D3 graphics
86 lines (76 loc) • 1.93 kB
YAML
version: 2
references:
default_container_config:
docker:
- image: node:12
attach_workspace:
attach_workspace:
at: ~/project
npm_cache_key: &npm_cache_key v1-dependency-npm-{{ checksum "package-lock.json" }}
restore_node_modules:
restore_cache:
keys:
-
- v1-dependency-npm-
cache_node_modules:
save_cache:
key:
paths:
- ./node_modules/
only_version_tags:
tags:
only: /^v.*$/
jobs:
install:
<<:
steps:
- checkout
- run:
name: Upgrade npm
command: npm i -g npm
-
- run:
name: Install dependencies
command: npm ci
-
- persist_to_workspace:
root: .
paths:
- .
test:
<<:
steps:
-
- run:
name: Run tests
command: npm test
release_npm:
<<:
steps:
-
- run:
name: Setup npm credentials
command: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ${HOME}/.npmrc
- run:
name: Publish npm package
command: ./node_modules/.bin/npm-prepublish --verbose && npm publish --access public --unsafe-perm
workflows:
version: 2
build-and-release:
jobs:
- install:
filters:
<<:
- test:
requires:
- install
filters:
<<:
- release_npm:
requires:
- install
- test
filters:
<<:
branches:
ignore: /.*/