Skip to content

Publish NPM Package #51

Publish NPM Package

Publish NPM Package #51

name: Publish NPM Package
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Publish
run: |
npm config set '//registry.npmjs.org/:_authToken' "${{secrets.NPM_AUTH_TOKEN}}"
npm install -D husky webpack
npx husky install
npx webpack --mode=production
npm publish --ignore-scripts
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}