Skip to content

M package-lock.json #11

M package-lock.json

M package-lock.json #11

Workflow file for this run

name: Publish to NPM
on:
workflow_dispatch:
push:
paths:
- package.json
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 21
- name: Install dependencies
run: npm install
- name: Run tests (If exists)
run: |
if [[ ! -z $(npm show . scripts.test) ]]; then
npm run test
fi
- name: Build the project
run: npm run build
- name: Set Npm Token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
- name: Publish package to NPM
run: npm publish || true
- name: Unset Npm Token
run: npm config delete //registry.npmjs.org/:_authToken