Skip to content

CI/CD and Release Pipeline

Relevant Source Files

This section provides a high-level overview of the automated workflows that govern the PALEE codebase. The project utilizes GitHub Actions to enforce code quality, manage repository organization, ensure security invariants, and orchestrate multi-platform releases to the NPM registry.

Pipeline Architecture

The automation strategy is divided into three primary phases: Continuous Integration (quality and correctness), Security & Maintenance (auditing and labeling), and Continuous Delivery (versioning and distribution).

Workflow Orchestration

The following diagram illustrates the relationship between repository events and the resulting GitHub Action workflows.

Workflow Event Mapping

Sources:


Continuous Integration (CI)

The CI pipeline is designed to be fast and comprehensive, running on every Pull Request and push to the main branch. It utilizes a test matrix to ensure compatibility across Node.js versions (22.x, 24.x) and Operating Systems (Ubuntu, Windows, macOS).

Key responsibilities include:

For detailed information on the CI configuration and coverage thresholds, see Continuous Integration.

Sources:


Release and NPM Publishing

The release pipeline is a strictly controlled, idempotent process triggered by Git tags. It enforces a "Build Once, Deploy Everywhere" philosophy by packing the library into a tarball and promoting that specific artifact through verification steps.

Release Safety Checks

The pipeline implements several guardrails to prevent broken releases:

  1. Version Consistency: The Git tag must exactly match the version defined in package.json.github/workflows/release.yml#30-38
  2. Artifact Validation: The scripts/verify-tarball.js script is executed against the generated .tgz to ensure no critical files (like dist/) are missing .github/workflows/release.yml#67-68
  3. Idempotency: Before publishing, the workflow checks the NPM registry via npm view to see if the version already exists, preventing failed "already published" errors .github/workflows/release.yml#100-109
  4. Windows Smoke Test: After publishing, the workflow waits for registry propagation and attempts a global install on a Windows runner to verify cross-platform binary availability .github/workflows/release.yml#140-179

For a deep dive into the publishing logic and artifact verification, see Release Workflow and NPM Publishing.

Sources:


Security and Governance

PALEE maintains strict security invariants, particularly regarding native dependencies.

Native Module Guardrail

A custom security job in security.yml scans the production dependency tree to ensure zero native binaries or toolchains (e.g., node-gyp, napi-rs) are included .github/workflows/security.yml#46-101 This preserves the project's goal of being a lightweight, pure-JS/TS CLI tool.

Repository Management

Sources:


Code-to-Workflow Mapping

This diagram maps specific codebase entities (scripts and config files) to the high-level workflow jobs that consume them.

Entity Relationship Diagram

Sources:

Released under the MIT License.