isoflow/.circleci/config.yml
2023-03-16 21:44:04 +00:00

50 lines
958 B
YAML

version: 2.1
defaults: &defaults
working_directory: ~/repo
docker:
- image: cimg/node:19.7.0
jobs:
build:
<<: *defaults
steps:
- checkout
- run:
name: Install dependencies
command: npm i
- run:
name: Build
command: npm run build
- run:
name: Publish to NPM
command: npm publish
- persist_to_workspace:
root: ~/repo
paths:
- ./dist
- ./LICENSE
- ./package.json
- ./README.md
deploy:
<<: *defaults
steps:
- attach_workspace:
at: ~/repo
- run:
name: Publish package
command: |
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
npm publish
workflows:
main:
jobs:
- build:
filters:
tags:
only: /^v.*/
- deploy:
requires:
- build