Skip to content

Commit

Permalink
Create release.yml (#72)
Browse files Browse the repository at this point in the history
* Create release.yml

* Update release.yml
  • Loading branch information
iChenLei authored Jun 16, 2021
1 parent b64889a commit 6164124
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: NPM Release

on:
release:
types: [created]

jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js v12.x
uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm install
- name: build package
run: npm run build
- name: cp file
run: cp {package.json,README.md,LICENSE,.npmignore} dist
- name: open dist
run: cd dist
- name: Npm publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

0 comments on commit 6164124

Please sign in to comment.