ci-validation-gates

Validate semver, npm tokens, retry logic, and draft releases in CI/CD pipelines.

Updated Mar 18, 2022
One-click install
npx skills add https://github.com/mpaulosky/dotfiles --skill ci-validation-gates-mpaulosky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ci-validation-gates
Source: https://github.com/mpaulosky/dotfiles/tree/main/.copilot/skills/ci-validation-gates
Command: npx skills add https://github.com/mpaulosky/dotfiles --skill ci-validation-gates-mpaulosky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill centralizes defensive CI/CD patterns to prevent release outages caused by invalid semver, wrong token types, missing retry logic, draft releases, and accidental version mutation observed in real incidents.

Core Features & Use Cases

  • Semver Validation Gate: Ensures publish workflows validate tag format and reject non-semver or 4-part versions before npm publish.
  • Token Type Verification: Verifies NPM_TOKEN is an Automation token (not a user token requiring 2FA) to avoid EOTP failures.
  • Retry & Verification Logic: Implements retry-based checks for npm registry propagation and explicit verification attempts after publish.
  • Draft Detection & Build Protection: Detects draft releases, enforces publish-on-published events, and requires SKIP_BUILD_BUMP to prevent build-time version mutation.
  • Use Case: Harden a Node package release pipeline to avoid multi-hour outages caused by malformed versions, wrong token usage, or eventual consistency timing issues.

Quick Start

Run the ci-validation-gates checklist against my repository to validate semver, confirm npm automation token usage, verify registry propagation with retries, and ensure the release is published before proceeding.

Frequently Asked Questions about ci-validation-gates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent npm publish failures caused by invalid semver in GitHub Actions?

To prevent npm publish failures from invalid semver, enforce a validation gate in your GitHub Actions workflow that checks tag format and rejects non-semver or 4-part versions before publishing. This catches malformed versions early in the CI/CD pipeline.

Why does my npm publish workflow fail with EOTP errors in CI?

npm publish workflows fail with EOTP errors when using a user NPM_TOKEN instead of an Automation token. You must verify your NPM_TOKEN is an Automation token type, which bypasses 2FA requirements for automated CI/CD publishing pipelines.

How do I handle npm registry propagation delays during automated releases?

Handle npm registry propagation delays by implementing retry-based verification logic that checks the registry after publish. This retry mechanism explicitly verifies the package is available, preventing eventual consistency timing issues from causing release outages.

How do I stop accidental version mutation during npm package builds?

Stop accidental version mutation during npm package builds by requiring the SKIP_BUILD_BUMP flag in your CI workflow. This prevents build-time version changes and ensures versioning only happens through controlled release processes.

Can I use CI validation gates for Node packages with draft GitHub releases?

Yes, CI validation gates detect draft release states and enforce publishing only on published release events. This prevents premature npm publishing when a GitHub release is still in draft, hardening the Node package release pipeline.

What is the best way to harden an npm publish workflow against release outages?

The best way to harden an npm publish workflow is to centralize defensive CI/CD patterns including semver validation, automation token verification, retry-based registry checks, and draft release detection to prevent multi-hour outages from malformed versions.