From 858b79d9f379601a9c25f8b0476ddfe41271b1ce Mon Sep 17 00:00:00 2001 From: Ping Chen Date: Tue, 25 Feb 2020 09:13:08 +0900 Subject: [PATCH] Set up circleci --- .circleci/.npmrc | 1 + .circleci/config.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .circleci/.npmrc create mode 100644 .circleci/config.yml diff --git a/.circleci/.npmrc b/.circleci/.npmrc new file mode 100644 index 0000000..bd3327a --- /dev/null +++ b/.circleci/.npmrc @@ -0,0 +1 @@ +//registry.npmjs.org/:_authToken=${NPM_TOKEN} \ No newline at end of file diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..e7322b0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,37 @@ +defaults: &defaults + docker: + - image: circleci/node:latest + +version: 2.1 +jobs: + release: + <<: *defaults + + steps: + - checkout + + - restore_cache: + keys: + - deps-{{ checksum "package.json" }} + + - run: + command: | + mv .circleci/.npmrc . + yarn + npm run release + + - save_cache: + paths: + - node_modules + key: deps-{{ checksum "package.json" }} + +workflows: + main: + jobs: + - release: + context: npm-release + filters: + branches: + ignore: /.*/ + tags: + only: /^v\d+\.\d+\.\d+$/