Skip to content

Build process

Build process #15

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
tags:
- 'v*.*.*'
jobs:
build-test-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install --no-lockfile
- name: Run tests
run: npm run test
- name: Build the project
run: npm run build
- name: Log in to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish to npm
if: startsWith(github.ref, 'refs/tags/')
run: npm publish --access public