Skip to content

Commit

Permalink
Update CD
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed Mar 26, 2020
1 parent 199d3ab commit f54923e
Showing 1 changed file with 34 additions and 16 deletions.
50 changes: 34 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,45 @@ on:
- 'v*'

jobs:
publish:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 13.2
- name: Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Verify
run: |
npm ci
npm run preversion
npm:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
uses: actions/setup-node@v1
with:
version: 13.2
- name: Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Verify
run: |
npm ci
npm run preversion
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
gh:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@master
- name: Publish
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
ORG="$(echo '${{ github.repository }}' | cut -d'/' -f1)"
echo "registry=https://npm.pkg.github.com/$ORG" > .npmrc
npm publish

0 comments on commit f54923e

Please sign in to comment.