2020-12-27 18:42:48 +01:00
|
|
|
# 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'
|
2021-02-08 14:57:20 +01:00
|
|
|
uses: 'actions/cache@v2.1.4'
|
2020-12-27 18:42:48 +01:00
|
|
|
with:
|
|
|
|
path: '**/node_modules'
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/package.json') }}
|
|
|
|
|
2021-02-23 11:09:02 +01:00
|
|
|
- uses: 'actions/setup-node@v2.1.5'
|
2020-12-27 18:42:48 +01:00
|
|
|
with:
|
|
|
|
node-version: 14
|
|
|
|
registry-url: 'https://registry.npmjs.org/'
|
|
|
|
|
|
|
|
- run: 'npm install'
|
|
|
|
- run: 'npm run build'
|
2020-12-29 05:02:19 +01:00
|
|
|
- run: 'npm publish --access public'
|
2020-12-27 18:42:48 +01:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|