Internal Developer Release Guide

Guidelines for automated CI/CD jobs, secret configurations, and release deployments to the NPM registry.

CI/CD Pipeline Architecture

The repository uses GitHub Actions to automate version checking and package publishing upon commits/pushes to the main branch.

Developer pushes to main
          │
          ├──► Runs "NPM Version Check" (Informational)
          │
          └──► Runs "NPM Publish"
                   │
                   ▼ Compares local vs remote
             Is local version ahead?
             ├── [Yes] ──► Authenticates with NPM_TOKEN ──► npm publish
             └── [No]  ──► Skips publish (Graceful exit)

Automated Actions (Workflows)

The automated jobs are declared in .github/workflows/:

🔍 NPM Version Check

Triggered on pull requests and pushes to main. Resolves version differences, checking if the current local version is ahead, equal, or behind the public registry version.

🚀 NPM Publish

Triggered on pushes to main. If the local version is higher than the current npm registry version, it logs into the registry and runs npm publish.

Standard Release Procedure

In-house developers can trigger a new release by following these steps:

🔒 Required Secrets Configuration

Ensure the repository has an repository secret named `NPM_TOKEN` configured under Settings > Secrets and variables > Actions > Secrets with write/publish permission to npmjs.com.

# 1. Bump the package version locally (bumps patch/minor/major)
npm version patch

# 2. Push to remote main with git tags
git push origin main --tags

# 3. The NPM Publish GitHub Action triggers automatically, checks if the version is ahead, 
# and deploys the package directly to NPM.