Skip to content

Commit

Permalink
ci(add github publish action for npm):
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Apr 27, 2020
1 parent c8aa0b4 commit d64e3de
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Node.js Package

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: yarn install, build, and test
run: |
yarn install
yarn build
yarn test
env:
CI: true

publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

0 comments on commit d64e3de

Please sign in to comment.