Skip to content

Commit

Permalink
chore: use actions to publish package
Browse files Browse the repository at this point in the history
  • Loading branch information
scopewu committed Sep 24, 2021
1 parent 2b56374 commit 4eb182e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
node-version: '14'

- name: Install dependencies
run: |
npm install -g yarn
yarn install
run: yarn install

- name: Build
run: yarn webpack --mode=production
Expand All @@ -43,3 +41,4 @@ jobs:
branch: gh-pages # The branch the action should deploy to.
folder: example/dist # The folder the action should deploy.
clean: true
single-commit: true
27 changes: 27 additions & 0 deletions .github/workflows/node.js-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Node.js Package

on:
release:
types:
- created

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: yarn install

- name: Publish
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 4eb182e

Please sign in to comment.