2019-08-07 19:46:00 -07:00
|
|
|
name: Node.js Package
|
2019-08-07 13:32:43 -07:00
|
|
|
|
|
|
|
|
on:
|
2019-09-17 12:31:43 -07:00
|
|
|
release:
|
|
|
|
|
types: [created]
|
2019-08-07 13:32:43 -07:00
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
build:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2019-12-24 14:22:22 -08:00
|
|
|
- uses: actions/checkout@v2
|
2019-08-07 13:32:43 -07:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
with:
|
2019-08-14 14:05:28 -04:00
|
|
|
node-version: 12
|
2019-08-07 13:32:43 -07:00
|
|
|
- run: npm ci
|
|
|
|
|
- run: npm test
|
|
|
|
|
|
|
|
|
|
publish-npm:
|
|
|
|
|
needs: build
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2019-12-24 14:22:22 -08:00
|
|
|
- uses: actions/checkout@v2
|
2019-08-07 13:32:43 -07:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
with:
|
2019-08-14 14:05:28 -04:00
|
|
|
node-version: 12
|
2019-08-07 13:32:43 -07:00
|
|
|
registry-url: https://registry.npmjs.org/
|
2019-08-20 15:00:38 -07:00
|
|
|
- run: npm ci
|
2019-08-07 13:32:43 -07:00
|
|
|
- run: npm publish
|
|
|
|
|
env:
|
|
|
|
|
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
|
|
|
|
|
|
|
|
publish-gpr:
|
|
|
|
|
needs: build
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
2019-12-24 14:22:22 -08:00
|
|
|
- uses: actions/checkout@v2
|
2019-08-07 13:32:43 -07:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
|
with:
|
2019-08-14 14:05:28 -04:00
|
|
|
node-version: 12
|
2019-08-07 13:32:43 -07:00
|
|
|
registry-url: https://npm.pkg.github.com/
|
|
|
|
|
scope: '@your-github-username'
|
2019-08-20 15:00:38 -07:00
|
|
|
- run: npm ci
|
2019-08-07 13:32:43 -07:00
|
|
|
- run: npm publish
|
|
|
|
|
env:
|
2019-08-07 14:43:09 -07:00
|
|
|
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|