Skip to content

fix: package.json & package-lock.json to reduce vulnerabilities #406

fix: package.json & package-lock.json to reduce vulnerabilities

fix: package.json & package-lock.json to reduce vulnerabilities #406

Workflow file for this run

name: CI CD
on:
push:
branches:
- '**'
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-?*'
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: node --version
- run: npm --version
- run: npm ci
- run: npm run lint:js
- run: npm run lint:ts
publish:
name: Publish
if: startsWith(github.ref, 'refs/tags/v')
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- run: node --version
- run: npm --version
- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish beta to NPM
if: startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')
run: npm publish --tag=beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}