Clean up NPM_PUBLISH step

This commit is contained in:
dannyrb 2019-11-15 09:11:31 -05:00
parent bb74f3a761
commit 97a9a505ca

View File

@ -213,16 +213,15 @@ jobs:
NPM_PUBLISH: NPM_PUBLISH:
<<: *defaults <<: *defaults
steps: steps:
# Update yarn
- run: yarn -v - run: yarn -v
# Checkout code and ALL Git Tags # Checkout code and ALL Git Tags
- checkout: - checkout:
post: post:
- git fetch --all - git fetch --all
# Use increasingly general patterns to restore cache
- restore_cache: - restore_cache:
name: Restore Yarn and Cypress Package Cache name: Restore Yarn and Cypress Package Cache
keys: keys:
# when lock file changes, use increasingly general patterns to restore cache
- yarn-packages-{{ checksum "yarn.lock" }} - yarn-packages-{{ checksum "yarn.lock" }}
- yarn-packages- - yarn-packages-
- run: - run:
@ -231,23 +230,22 @@ jobs:
- save_cache: - save_cache:
name: Save Yarn Package Cache name: Save Yarn Package Cache
paths: paths:
- ~/.cache ## Cache yarn and Cypress - ~/.cache/yarn
key: yarn-packages-{{ checksum "yarn.lock" }} key: yarn-packages-{{ checksum "yarn.lock" }}
- run: - run:
name: Avoid hosts unknown for github name: Avoid hosts unknown for github
command: command: |
mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking rm -rf ~/.ssh
no\n" > ~/.ssh/config mkdir ~/.ssh/
- run: git config --global user.email "danny.ri.brown+ohif-bot@gmail.com" echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: git config --global user.name "ohif-bot" git config --global user.email "danny.ri.brown+ohif-bot@gmail.com"
git config --global user.name "ohif-bot"
- run: - run:
name: Authenticate with registry name: Authenticate with NPM registry
command: command:
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
- run: npx lerna version - run: npx lerna version
- run: npx lerna publish from-package - run: npx lerna publish from-package
# Persist :+1:
- persist_to_workspace: - persist_to_workspace:
root: ~/repo root: ~/repo
paths: . paths: .