Operational guide to validate, package, and publish the engineering knowledge base (KB) as a ZIP artifact, then attach it to a GitHub Release for consumers to install/update from.
- KB maintainers (this repository)
- Platform/DevEx engineers responsible for distributing KB updates
- Node.js + npm
- Git
- GitHub CLI (
gh) (used by the release script) - Pair CLI (
pair-cli) installed globally
gh --versionIf missing, install it (macOS/Homebrew example):
brew install ghgh auth login -h github.com
gh auth statusThe release script invokes pair-cli package .... Install it globally:
npm install -g @foomakers/pair-cliIf the package is hosted on GitHub Packages, authenticate npm before installing.
Create a PAT that can read packages from GitHub Packages.
- If the package is in a private org/repo, you typically need:
read:packages- and repository access as needed (depending on org settings)
This repo ignores .npmrc via .gitignore. Keep your token local.
Option A (recommended): use an environment variable in a repo-local .npmrc
Create ./.npmrc with:
@foomakers:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}Then export the token in your shell:
export GITHUB_TOKEN="YOUR_PAT_HERE"After setup, verify the CLI:
pair-cli --helpUse the release script as the only supported workflow in this repository. It will:
- validate/package the KB into a ZIP (internally)
- tag the version
- create a GitHub Release and upload the ZIP asset
chmod +x scripts/release.sh
scripts/release.sh --version 1.0.1Common options:
scripts/release.sh --version 1.0.1 --draft
scripts/release.sh --version 1.0.1 --notes "Release notes..."
scripts/release.sh --version 1.0.1 --no-package # reuse existing dist/*.zipThe script publishes:
- a Git tag, e.g.
v1.0.1 - a GitHub Release named
v1.0.1 - a ZIP asset under
dist/(example:dist/kb-package-<timestamp>.zip) - a
manifest.jsoninside the ZIP with metadata (including the package version)
Re-authenticate:
gh auth login -h github.comInstall or reinstall globally:
npm install -g @foomakers/pair-cli
pair-cli --helppair vX.Y.Zprinted in logs is the CLI version--pkg-version A.B.Cis the package version that goes into the package manifest