mirror of
https://github.com/markmanx/isoflow.git
synced 2025-02-07 20:10:47 +00:00
57 lines
1.1 KiB
YAML
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.*/
|