2020-11-22 02:28:14 +00:00
|
|
|
name: publish
|
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- created
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
# Setup .npmrc file to publish to npm
|
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
# Align the version of Node here with ci.yml.
|
2021-04-24 01:52:03 +00:00
|
|
|
node-version: '16.x'
|
2020-11-22 02:28:14 +00:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
2021-02-27 03:15:56 +00:00
|
|
|
# Will also (through `prepare` hook): 1. install ./app, and 2. build
|
2021-09-20 15:15:57 +00:00
|
|
|
- run: npm ci --no-fund
|
2020-11-22 02:28:14 +00:00
|
|
|
- run: npm test
|
2021-02-27 03:15:56 +00:00
|
|
|
- run: npm run lint
|
2020-11-22 02:28:14 +00:00
|
|
|
- run: npm publish
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|