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-10 11:12:22 +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 13:10:48 -04:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm test
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
2022-03-28 13:10:48 -04:00
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
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}}