Skip to content

Refactoring

Refactoring #4

Workflow file for this run

name: Run Tests and Publish
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org/'
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
- name: Publish to npm
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_KEY }}