diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..0649871 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,63 @@ +orbs: + repo: + executors: + default: + docker: + - image: circleci/node:10 + + commands: + test: + steps: + - checkout + - restore_cache: + keys: + - &cache_key npm_cache-{{ .Branch }} + - npm_cache- + + - run: + name: Install Dependencies + command: npm ci + + - save_cache: + key: *cache_key + paths: + - ~/.npm + + - run: + name: Run Test + command: npm test + + deploy: + steps: + - run: + name: Deploy + command: npx semantic-release + + jobs: + default: + executor: default + steps: + - test + + master: + executor: default + steps: + - test + - deploy + +version: 2.1 + +workflows: + main: + jobs: + - repo/default: + filters: + branches: + ignore: + - master + + - repo/master: + filters: + branches: + only: + - master diff --git a/README.md b/README.md index 908f15f..ced108d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Prettier plugin for package.json +[![CircleCI](https://circleci.com/gh/matzkoh/prettier-plugin-packagejson.svg?style=shield)](https://circleci.com/gh/matzkoh/prettier-plugin-packagejson) +[![Renovate](https://badges.renovateapi.com/github/matzkoh/prettier-plugin-packagejson)](https://renovatebot.com/) + ## Installation ```bash