mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-11-09 22:20:08 +01:00
37 lines
939 B
YAML
37 lines
939 B
YAML
# 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: Use Node.js ${{ matrix.node-version }}
|
|
uses: 'actions/setup-node@v2.1.5'
|
|
with:
|
|
node-version: 14
|
|
registry-url: 'https://registry.npmjs.org/'
|
|
|
|
- name: 'Cache dependencies'
|
|
uses: 'actions/cache@v2.1.5'
|
|
with:
|
|
path: '.npm'
|
|
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
|
|
|
|
- name: 'Install dependencies'
|
|
run: 'npm ci --cache .npm --prefer-offline'
|
|
|
|
- name: 'Build'
|
|
run: 'npm run build'
|
|
|
|
- name: 'Publish package on npm'
|
|
run: 'npm publish --access public'
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|