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

34 lines
833 B
YAML
Raw 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
2022-10-20 04:29:35 +00:00
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
2020-02-20 12:44:22 -05:00
2019-08-07 19:46:00 -07:00
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
2022-03-28 17:11:12 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
2021-12-01 19:39:01 +00:00
node-version: 16
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
2022-03-28 17:11:12 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
2021-12-01 19:39:01 +00:00
node-version: 16
registry-url: https://registry.npmjs.org/
2019-08-20 15:00:38 -07:00
- run: npm ci
- run: npm publish
env:
2020-11-30 17:02:58 +00:00
NODE_AUTH_TOKEN: ${{secrets.npm_token}}