2020-12-27 18:42:48 +01:00
|
|
|
name: 'Node.js Package'
|
|
|
|
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [created]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish-npm:
|
|
|
|
runs-on: 'ubuntu-latest'
|
|
|
|
steps:
|
2021-05-12 16:41:03 +02:00
|
|
|
- uses: 'actions/checkout@v2.3.4'
|
2020-12-27 18:42:48 +01:00
|
|
|
|
2021-07-01 09:27:46 +02:00
|
|
|
- name: 'Use Node.js'
|
|
|
|
uses: 'actions/setup-node@v2.2.0'
|
2021-03-08 14:33:53 +01:00
|
|
|
with:
|
2021-07-01 09:27:46 +02:00
|
|
|
node-version: '16.x'
|
|
|
|
cache: 'npm'
|
2021-03-08 14:33:53 +01:00
|
|
|
registry-url: 'https://registry.npmjs.org/'
|
|
|
|
|
2021-07-01 09:27:46 +02:00
|
|
|
- name: 'Install'
|
|
|
|
run: 'npm install'
|
2021-03-08 14:33:53 +01:00
|
|
|
|
|
|
|
- name: 'Build'
|
|
|
|
run: 'npm run build'
|
2020-12-27 18:42:48 +01:00
|
|
|
|
2021-07-01 09:27:46 +02:00
|
|
|
- name: 'Publish'
|
2021-03-08 14:33:53 +01:00
|
|
|
run: 'npm publish --access public'
|
2020-12-27 18:42:48 +01:00
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|