Skip to content

rod-dvla Pushed To main #1

rod-dvla Pushed To main

rod-dvla Pushed To main #1

Workflow file for this run

name: Push To Main Branch
run-name: ${{github.actor}} Pushed To ${{github.ref_name}}
on:
push:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Audit
run: npm run audit --audit-level=moderate
- name: Lint
run: npm run lint
- name: Run tests
run: npm run test
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js for deployment
uses: actions/setup-node@v4
with:
node-version: 18
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}