workflow to publish package

This commit is contained in:
Yuqiu Wang
2021-05-12 17:01:26 -05:00
committed by yuqiuw
parent eaff4a6b9a
commit 56ded14198

33
.github/workflows/release-package.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: Node.js Package
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://npm.pkg.github.com/
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}