Files

51 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2020-02-20 12:44:22 -05:00
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
2019-08-07 19:46:00 -07:00
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
2019-12-24 14:22:22 -08:00
- uses: actions/checkout@v2
2021-03-13 14:34:06 +09:00
- uses: actions/setup-node@v2
with:
node-version: 14
- 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
2021-03-13 14:34:06 +09:00
- uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
2019-08-20 15:00:38 -07:00
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
2019-12-24 14:22:22 -08:00
- uses: actions/checkout@v2
2021-03-13 14:34:06 +09:00
- uses: actions/setup-node@v2
with:
node-version: 14
2020-09-09 15:42:40 -07:00
registry-url: $registry-url(npm)
2019-08-20 15:00:38 -07:00
- run: npm ci
- run: npm publish
env:
2019-08-07 14:43:09 -07:00
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}