Skip to content

🔧 chore(npm-publish-github-packages.yml): add workflow_dispatch event… #10

🔧 chore(npm-publish-github-packages.yml): add workflow_dispatch event…

🔧 chore(npm-publish-github-packages.yml): add workflow_dispatch event… #10

name: Node.js Package
on:
workflow_dispatch:
release:
types: [created]
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install
- run: yarn build
publish-gpr:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{secrets.GITH_PACKAGE_TOKEN}}
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}