Skip to content

Commit

Permalink
Merge pull request #118 from nervina-labs/npm-publish-ci
Browse files Browse the repository at this point in the history
ci: add an action to publish packages
  • Loading branch information
Keith-CY authored Dec 14, 2021
2 parents f837419 + 8d76b40 commit 5f95701
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish to npm registry

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '16'
cache: 'npm'

- name: Cache Node Modules
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- name: Install Dependencies
run: npm ci

- name: Change Dir
run: cd dist/libs/mibao-ui

- name: Publish to NPM registry
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

1 comment on commit 5f95701

@vercel
Copy link

@vercel vercel bot commented on 5f95701 Dec 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.