ci: add npm-publish
This commit is contained in:
parent
7890ab98ce
commit
d5e0dcc69d
30
.github/workflows/npm-publish.yml
vendored
Normal file
30
.github/workflows/npm-publish.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||
|
||||
name: 'Node.js Package'
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
publish-npm:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v2'
|
||||
|
||||
- name: 'Cache dependencies'
|
||||
uses: 'actions/cache@v2'
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
|
||||
|
||||
- uses: 'actions/setup-node@v2.1.2'
|
||||
with:
|
||||
node-version: 14
|
||||
registry-url: 'https://registry.npmjs.org/'
|
||||
|
||||
- run: 'npm install'
|
||||
- run: 'npm run build'
|
||||
- run: 'npm publish'
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
@ -45,7 +45,8 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"lint": "exit 0"
|
||||
"lint": "exit 0",
|
||||
"build": "exit 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonwebtoken": "8.5.1",
|
||||
|
Reference in New Issue
Block a user