OFTR-009: Release Publishing
Synced from
outfitter/docs/requirements/OFTR-009-release-publishing.md. The repository is the source of truth.
Overview
Section titled “Overview”Outfitter release publishing prepares package metadata from Conventional Commit release PRs and GitHub release tags. It publishes the @ai-outfitter/outfitter CLI workspace package through npm trusted publishing and OIDC. It publishes a Debian-based container image through GitHub Container Registry.
Requirements
Section titled “Requirements”OFTR-009.1: Release Metadata Synchronization
Section titled “OFTR-009.1: Release Metadata Synchronization”- The release metadata synchronization script MUST accept a release version from an explicit argument,
OUTFITTER_RELEASE_VERSION, orGITHUB_REF_NAME, in that precedence order. - The release metadata synchronization script MUST normalize a leading
vfrom release tags before writing package metadata. - The release metadata synchronization script MUST reject invalid Semantic Versioning values before mutating package metadata.
- The release metadata synchronization script MUST update the root
package.jsonversion, CLI workspacepackage.jsonversion, rootpackage-lock.jsonversion, package-lock root entry version, and package-lock CLI workspace entry version to the same normalized release version. - The release metadata synchronization script MUST verify that the package metadata it prepares for publishing belongs to the
@ai-outfitter/outfitternpm package. - The release metadata synchronization script MUST verify that published package metadata declares
repository.urlashttps://github.com/ai-outfitter/outfitter.gitso npm provenance validation can match the publishing repository. - The release metadata synchronization script MUST fail with an actionable error when required package-lock root or CLI workspace package metadata is missing.
OFTR-009.2: Npm Release Workflow
Section titled “OFTR-009.2: Npm Release Workflow”- The npm release workflow MUST run when a GitHub release is published.
- The npm release workflow MUST install dependencies with
npm cibefore publishing. - The npm release workflow MUST synchronize package metadata from the GitHub release tag before publishing.
- The npm release workflow MUST run CI checks before publishing.
- The npm release workflow MUST build the package before publishing.
- The npm release workflow MUST request
id-token: write, use thenpm-publishGitHub environment, and publish the public@ai-outfitter/outfitterpackage to the npm registry with provenance through npm trusted publishing / OIDC rather thanNPM_TOKENorNODE_AUTH_TOKEN.
OFTR-009.3: Conventional Commit Release Automation
Section titled “OFTR-009.3: Conventional Commit Release Automation”- The Release Please workflow MUST run on pushes to
main. - The Release Please workflow MUST use
googleapis/release-please-action@v4with the upstream example-style token input fromsecrets.RELEASE_PLEASE_TOKEN. - The Release Please workflow MUST use manifest configuration files to release the
code/cliworkspace as the@ai-outfitter/outfitternode package. - The Release Please workflow MUST derive version bumps from Conventional Commits.
- The Release Please workflow MUST update npm package metadata and changelog through a release PR before publishing.
- The Release Please workflow MUST use GitHub repository write auth capable of triggering release PR CI and the release-published npm workflow, not the default
GITHUB_TOKEN.
OFTR-009.4: Container Image Runtime
Section titled “OFTR-009.4: Container Image Runtime”- The primary published container image MUST be Debian-based so end users can extend it with a conventional Dockerfile (
apt-get install,COPYof dynamically linked binaries). - The primary image MUST install Outfitter from the CLI workspace tarball built in the release workflow, not from the npm registry, so the image is buildable for unreleased versions and in CI before publish.
- The primary image MUST include Node.js matching the
.node-versionmajor, npm, Git, SSH, and CA certificates at their conventional Debian paths, and MUST useoutfitteras its entrypoint. - The primary image MUST run as UID/GID 1000 with
/workspaceas its working directory and/tmpas its default home directory. - The release workflow MUST smoke test the image before publishing it. The test MUST check
outfitter --version, Node.js, npm, Git, SSH, and the CA bundle at/etc/ssl/certs/ca-certificates.crt. - The release workflow MUST smoke test a derivative build of the image. The build MUST install a package with
apt-getas root. The build MUST return to UID 1000. - Documentation MUST define the persistent Kubernetes invocation and conventional Dockerfile extension. It MUST explain that callers own profile configuration, credentials, and channel-specific extensions.