Skip to content

Commit

Permalink
chore(ci): split npm and release job into 2 actions
Browse files Browse the repository at this point in the history
  • Loading branch information
wxsms committed Oct 10, 2020
1 parent 39b1a2e commit 7e04239
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/publish_npm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CD_NPM

on:
push:
tags:
- 'v*'

jobs:
deploy_npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn --frozen-lockfile
- name: Build dist
run: npm run dist
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
name: CD
name: CD_RELEASE

on:
push:
tags:
- 'v*'

jobs:
deploy_npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: c-hive/gha-yarn-cache@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn --frozen-lockfile
- name: Build dist
run: npm run dist
- name: Publish NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
deploy_release:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 7e04239

Please sign in to comment.