ci: adjust Nightlies/release job so NPM credentials are always removed

That is, the file `${HOME}/.npmrc` will be deleted by the "Remove NPM
credentials" step even if a previous step failed.
This commit is contained in:
Michael Bradley, Jr 2020-01-20 11:02:16 -06:00 committed by Michael Bradley
parent c98e769d0d
commit 0ca8635538
1 changed files with 2 additions and 1 deletions

View File

@ -75,6 +75,7 @@ jobs:
# EMBARKBOT_NPM_TOKEN should correspond to https://www.npmjs.com/~embarkbot # EMBARKBOT_NPM_TOKEN should correspond to https://www.npmjs.com/~embarkbot
NPM_TOKEN: ${{ secrets.EMBARKBOT_NPM_TOKEN }} NPM_TOKEN: ${{ secrets.EMBARKBOT_NPM_TOKEN }}
- name: Remove NPM credentials - name: Remove NPM credentials
if: always()
# Delete .npmrc instead of running `npm logout` because the logout command permanently invalidates the current token # Delete .npmrc instead of running `npm logout` because the logout command permanently invalidates the current token
run: | run: |
rm ${HOME}/.npmrc rm -f ${HOME}/.npmrc