From 777433860648287984d437a89a7324224b40940a Mon Sep 17 00:00:00 2001 From: Mathias Scherer Date: Wed, 17 Jul 2019 14:04:07 +0200 Subject: [PATCH] finalizes ci auto publish workflow --- .circleci/config.yml | 41 +++++++---------------------------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e0a222c..32e33f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,9 +44,15 @@ jobs: - run: name: Authenticate with registry command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/project/.npmrc + - add_ssh_keys + - run: + name: configure git + command: | + git config user.email "automated@circleci.com" + git config user.name "CircleCI" - run: name: set package version - command: npm version from-git + command: npm version $(git describe --tag) - run: name: Publish package command: npm publish @@ -54,31 +60,6 @@ jobs: root: . paths: - ./package.json - pushToGit: - docker: - - image: circleci/node:10 - working_directory: ~/project - environment: - BASH_ENV: bash_env - steps: - - checkout - - attach_workspace: - at: ~/project/ - - add_ssh_keys - - run: - name: configure git - command: | - git config user.email "automated@circleci.com" - git config user.name "CircleCI" - - run: - name: commit - command: | - git add . - git commit -m "[skip ci] bump version" - - run: - name: push to git - command: git push - persistCache: docker: - image: circleci/node:10 @@ -137,13 +118,5 @@ workflows: ignore: /.*/ tags: only: /\d+\.\d+\.\d+/ - - pushToGit: - requires: - - publish - filters: - branches: - ignore: /.*/ - tags: - only: /\d+\.\d+\.\d+/ \ No newline at end of file