isoflow/.circleci/config.yml
2023-07-25 16:31:06 +01:00

57 lines
1.1 KiB
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 ci
- run:
name: Run tests
command: npm run test
- run:
name: Build
command: npm run build
- 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:
branches:
ignore: /.*/
tags:
only: /^v.*/
- deploy:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/