Files
starter-workflows/ci/npm-publish.yml
T

46 lines
994 B
YAML
Raw Normal View History

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
- uses: actions/setup-node@v1
with:
2019-08-14 14:05:28 -04:00
node-version: 12
- 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
- uses: actions/setup-node@v1
with:
2019-08-14 14:05:28 -04:00
node-version: 12
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
steps:
2019-12-24 14:22:22 -08:00
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
2019-08-14 14:05:28 -04:00
node-version: 12
registry-url: https://npm.pkg.github.com/
scope: '@your-github-username'
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}}