The GitHub Release asset upload reuses the existing release for an already-published tag and sets overwrite_files: false: existing same-name assets are left unchanged on retry, while missing assets can still be attached. A same-tag retry never creates a second release or replaces a published artifact.
Formal publishing is disabled by default. The tag-triggered GitHub Release, npm, PyPI and versioned OCI publishing jobs require the repository variable FORGE_RELEASE_ENABLED to equal the exact string true.
- Build and publish GitHub release assets creates the versioned GitHub Release after signed-tag, support-window, artifact-security, provenance and independent approval gates pass.
- Stage npm package for maintainer approval stages the signed tarball through npm trusted publishing; if the exact version is already public, the workflow reports an explicit skip and never attempts to overwrite it. A maintainer must still approve a new staged package with npm 2FA.
- Publish PyPI builds the Python SDK and uploads its wheel and source distribution through PyPI trusted publishing after the protected
pypienvironment approves. Existing distribution files are skipped safely. - Publish OCI image builds a multi-platform image only for development-branch pushes or explicitly enabled, verified release tags.
When the variable is absent or any other value, each publishing workflow records a clear skipped job and performs no release creation or registry upload. Do not enable the switch until signing keys, support commitments, protected environments and registry trusted publishers are configured.
The release publishers call the repaired cross-platform CI workflow by an immutable commit SHA rather than a relative workflow path. This keeps the CI concurrency repair in force when a manual retry targets an older, already-signed tag; the called workflow still checks out and tests the selected tag commit. Each publisher checks out the exact signed tag for the artifact source and checks out the current main branch into .forge-release-tools for release-tag, support-window, freeze, reviewer-approval, npm OIDC and OCI idempotency verification. The helper checkout is excluded from the OCI build context. Manual retries use workflow_dispatch on the existing v0.0.1 tag; the OIDC verifier permits that event only with the exact semantic-version tag ref, configured workflow identity and GitHub-hosted runner.
The repository also runs CI, dedicated documentation validation, dependency review, scheduled dependency audits, nightly verification, GitHub Pages deployment and OpenSSF Scorecard.
The main quality check runs npm run check:lockfile; the non-publishing release-readiness workflow runs the same check before npm ci. It validates local lockfile v3 metadata, the root dependency declarations, package graph resolution, safe package paths, HTTPS tarball URLs and strong SRI digests. It fails closed on malformed JSON, symlinks, missing required lockfiles, inconsistent dependency graphs and invalid integrity metadata. The subsequent npm ci still verifies downloaded tarball bytes; this offline preflight does not claim to replace that verification.
Run the Release candidate readiness (no publish) GitHub Actions workflow from the Actions tab, optionally supplying the exact candidate version. It runs the full project checks, validates package, lockfile and version-matched changelog metadata, inspects the npm archive allowlist and runtime files, audits dependencies, builds the archive and SPDX SBOM, verifies SHA-256 checksums and stores the outputs as a short-lived workflow artifact.
This workflow has read-only repository permissions. It does not push a tag, create a GitHub Release, publish to npm or change the package version. It runs automatically on every push to latest/development. It also prepares a review candidate every Monday at 04:23 UTC after the workflow file is present on the repository's default branch. Because GitHub schedules execute the workflow file from the default branch, the scheduled run explicitly checks out the latest latest/development commit and records that exact SHA in the artifact name and workflow summary.
Run the same checks locally:
npm ci
npm run check
npm run check:release
npm pack --ignore-scripts --dry-run
mkdir -p dist
npm pack --ignore-scripts --pack-destination dist
npm sbom --sbom-format spdx > dist/forge.spdx.json
(cd dist && sha256sum *.tgz *.spdx.json > SHA256SUMS && sha256sum --check SHA256SUMS)
npm run verify:artifacts -- distThe protected GitHub Release workflow applies three independent checks to the exact release inputs before generating checksums, detached signatures or publication assets:
- Dependency vulnerability gate:
npm audit --jsonis evaluated against the generated SPDX SBOM. The gate validates audit summary totals, severity values and package-to-SBOM membership. High and critical findings block the release by default; lower severities remain visible in the report. - SPDX licence policy:
support/license-policy.jsonis the reviewed release allowlist and denylist. The gate parses SPDXAND,OR, parentheses andWITHexpressions. Unknown identifiers, undeclared licences, denied terms and unapproved exceptions block the release. AnORexpression is acceptable when at least one explicit alternative is allowed; allANDterms must be allowed. - Artifact malware scan: ClamAV definitions are refreshed on the release runner before the npm archive, Debian package and installer directory trees are scanned. A detected threat, missing scanner, missing definitions, timeout or scanner error fails closed. Symlinked or non-regular artifact entries are rejected before scanning.
The vulnerability and licence reports, plus the malware scan report, are written to the runner's temporary directory rather than included in the distributable archive. Scanner output does not grant release approval or enable publication. These gates run only inside the already protected release workflow.
Run the deterministic policy tests locally with node --test test/sbom-vulnerability-gate.test.js test/license-policy.test.js test/artifact-malware.test.js. The malware scanner integration itself requires ClamAV and an updated local virus database; use node scripts/scan-release-artifacts.js --directory dist --directory release-assets --report /tmp/forge-malware-report.json after building release artifacts.
The cross-platform-archive CI job builds the npm package archive independently on Linux, macOS and Windows. Each runner checks the gzip/tar structure without extracting files, validates POSIX checksums and package identity, and compares every archived file with the npm pack dry-run JSON manifest produced on that runner.
The verifier rejects path traversal, absolute or drive-qualified paths, backslash separators, Unicode-normalization ambiguity, Windows-reserved names, case-colliding files, file/directory conflicts, links, special tar members, malformed PAX metadata, truncated data and unexpected archive contents. It accepts portable POSIX ustar entries and bounded local PAX path overrides. No archive member is extracted or written to the workspace.
Run the same check locally:
```bash mkdir -p .forge-cross-platform-archive npm pack --ignore-scripts --pack-destination .forge-cross-platform-archive npm run verify:archive -- .forge-cross-platform-archive node --test test/cross-platform-archive.test.js ```
The archive verifier is a packaging integrity check, not a malware scanner or proof that application code behaves identically on every operating system. Runtime compatibility evidence remains in COMPATIBILITY.md.
- Create or join the npm organisation that owns the
@netcore-technologiesscope. A GitHub organisation does not automatically create an npm organisation. - The initial package must exist before the trusted publisher can be configured. Bootstrap one reviewed version using an authorised maintainer account with 2FA.
- Open the package on npmjs.com → Settings → Trusted publishing → GitHub Actions.
- Configure owner
NetCore-Technologies, repositoryFORGE, workflow filenamenpm-publish.yml, and environmentnpm. Do not grant directnpm publishpermission; CI uses the stage-onlynpm stage publishpath and a maintainer performs the later 2FA approval. - Create the GitHub
npmenvironment. Add required reviewers if releases need approval. - The workflow uses Node.js 24, current npm,
id-token: write, GitHub-hosted runners and no long-lived npm write token. It checks the exact version against the public registry first: an already-published immutable version is reported and skipped, while unavailable/unknown registry state fails closed. For a new version it stages the exact prebuilt and attested tarball withnpm stage publishrather than callingnpm publishdirectly. Keep direct-publish permission disabled in the npm trusted-publisher settings; staged publishing is supported by the trusted publisher. A separate maintainer approval with npm 2FA is required before the staged version becomes public.
npm trusted publishing requires npm CLI 11.5.1+ and Node.js 22.14.0+. The staged-publishing command requires npm CLI 11.15.0+; the workflow installs the current npm CLI before staging. See npm's trusted publisher documentation.
-
Run the non-publishing release-candidate preflight and inspect its archive, SBOM and checksums.
-
Update
versioninpackage.jsonandpackage-lock.json, and add a matching## [VERSION]entry toCHANGELOG.mdwith at least two populated sections and three substantive bullets. Runnpm ci,npm run checkandnpm pack --ignore-scripts --dry-run. -
Commit the version change and merge it into
main. Release-tag verification fetchesrefs/remotes/origin/mainand rejects a signed tag unless its target commit is already an ancestor of that stable branch. -
Obtain the required maintainer approvals, then set the repository variable
FORGE_RELEASE_ENABLED=true. -
Create and push an annotated GPG-signed tag with the exact pinned release-signing key (lightweight or unsigned tags are rejected):
git tag -s -u "$FORGE_RELEASE_SIGNING_FINGERPRINT" v0.1.1 -m "FORGE v0.1.1" && git verify-tag v0.1.1 && git push origin v0.1.1. The initialv0.0.1release is intentionally marked as a GitHub prerelease byrelease-assets.ymlwhile retaining the exact0.0.1SemVer version; this GitHub-only override does not change the npm or container channel classification, which remainsstable/latest.Retry an existing signed tag: never recreate or force-move an already-pushed tag. Once the workflow files are present on the default branch and the release switch and environment approvals are configured, dispatch the publishers against the existing tag ref:
gh workflow run release-assets.yml --ref v0.0.1,gh workflow run npm-publish.yml --ref v0.0.1,gh workflow run publish-pypi.yml --ref v0.0.1, andgh workflow run container-publish.yml --ref v0.0.1. Each run still verifies the signed tag and stable-main ancestry. PyPI usesskip-existing: trueso an identical distribution already uploaded is not treated as a fatal error. -
Confirm Build and publish GitHub release assets passes and Stage npm package for maintainer approval reports that the exact tarball was staged. Open npmjs.com → the
@netcore-technologies/forgepackage → Staged Packages, inspect the package/version/tarball and computed dist-tag, then approve the stage with npm 2FA only after review. Until that separate approval, the staged version is not available to public installs. -
Confirm each publishing job verifies GitHub SLSA provenance for every archive, SBOM, checksum and detached signature, with the signer workflow and source tag pinned. Check the GitHub Release assets and verify npm provenance after publish.
-
Disable the release switch again after the approved release window if continuous release automation is not intended.
Generate a release-specific smoke-test plan after downloading the six-file npm artifact bundle:
node scripts/post-release-smoke-plan.js \
--directory ./downloaded-release/dist \
--repository NetCore-Technologies/FORGE \
--tag v1.2.3 \
--jsonThe plan is read-only: it does not install packages, start a server, contact registries or publish a release. It lists the expected artifact/signature checks, GitHub SLSA provenance checks, exact npm version lookup, isolated package installation, installed CLI checks, a loopback Control Center check, container manifest verification and the APT state check. Review the generated commands and prepare a disposable runner before executing them. The APT check is required only when public APT distribution is enabled.
After the required smoke checks pass, monitor public distribution endpoints with the bounded health observer. Start from the example policy and adjust the URLs/status expectations only for the endpoints enabled by the release:
node scripts/observe-release-health.js \
--config support/release-health.example.json \
--report ./release-health-v1.2.3.jsonThe observer polls approved HTTPS endpoints for a configured window, rejects redirects and unapproved hosts, and reports per-endpoint availability, P50/P95 latency and failed samples. Its default policy requires 100% successful observations and a maximum P95 latency of 5 seconds over a five-minute window. Cancelled, incomplete, unavailable or degraded windows do not pass. Reports are local files; they are not uploaded or used to roll back a release automatically.
After downloading the npm archive, SPDX SBOM, checksum manifest and their three detached signatures from a GitHub Release, verify the bundle against GitHub's SLSA provenance before installing it. Use a source checkout of the exact release tag and authenticate the GitHub CLI first:
gh auth login
git checkout v1.2.3
GITHUB_REPOSITORY=NetCore-Technologies/FORGE \
GITHUB_REF=refs/tags/v1.2.3 \
FORGE_PROVENANCE_SIGNER_WORKFLOW=.github/workflows/release-assets.yml \
node scripts/verify-build-provenance.js ./downloaded-release/distThe verifier requires exactly one .tgz archive, one SPDX SBOM, SHA256SUMS and all three detached signatures. It asks gh attestation verify to verify every subject against the exact repository, signed version tag, release workflow, SLSA v1 predicate and GitHub Actions OIDC issuer. It independently hashes the downloaded bytes and requires each verified attestation subject to bind the exact filename and SHA-256 digest. Missing attestations, malformed output, an unexpected bundle entry or a digest mismatch fails verification. Keep GH_TOKEN available to the GitHub CLI when private repository access or API rate limits require authentication.
Every formal npm and GitHub Release job signs the exact package archive, SPDX SBOM and SHA256SUMS file with GPG detached, ASCII-armored signatures:
<package-archive>.tgz.ascforge.spdx.json.ascSHA256SUMS.asc
The release workflow imports the private key only into an isolated, runner-local GNUPGHOME, creates the three signatures and immediately verifies each one against the configured full fingerprint. A mismatch, missing signature, partial signature set, tampered artifact or unavailable key fails the job before publication. GitHub Release assets include all three .asc files. The npm job publishes the exact already-signed tarball rather than rebuilding a second archive.
No permanent signing key is generated or committed by this repository. CI validates this path with a short-lived throwaway key that is never used for a real release.
Create a dedicated GPG signing key on a trusted machine. Keep its private key offline and protect it with a strong passphrase. Export the public and private material locally:
gpg --armor --export YOUR_FULL_FINGERPRINT > forge-release-public.asc
gpg --armor --export-secret-keys YOUR_FULL_FINGERPRINT > forge-release-private.ascAdd these GitHub repository settings before enabling formal publishing:
| Setting | Type | Value |
|---|---|---|
FORGE_RELEASE_SIGNING_PUBLIC_KEY |
Repository variable | Contents of forge-release-public.asc |
FORGE_RELEASE_SIGNING_FINGERPRINT |
Repository variable | Full 40- or 64-character primary fingerprint |
FORGE_RELEASE_SIGNING_PRIVATE_KEY |
Repository secret | Contents of forge-release-private.asc |
FORGE_RELEASE_SIGNING_PASSPHRASE |
Repository secret | Passphrase protecting the private key |
FORGE_RELEASE_ENABLED |
Repository variable | Keep unset or false until you explicitly approve a release |
Never commit forge-release-private.asc, paste it into an issue, or expose it in a workflow log. The public key can be published with release documentation after its fingerprint has been independently confirmed. The workflow does not create or sign a release until the normal release switch and protected release environment are approved.
Local maintainers can validate an already-built bundle with:
export FORGE_RELEASE_SIGNING_FINGERPRINT=YOUR_FULL_FINGERPRINT
export FORGE_RELEASE_SIGNING_PASSPHRASE='your key passphrase'
gpg --batch --import forge-release-private.asc
gpg --batch --import forge-release-public.asc
npm run sign:artifacts -- dist
FORGE_REQUIRE_ARTIFACT_SIGNATURES=true npm run verify:artifacts -- distRelease channels are derived from the tag itself and are emitted as verified workflow outputs. Stable tags (for example v0.1.1) publish to npm latest, receive the OCI latest alias and create a normal GitHub Release. -alpha.N and -beta.N tags use their matching npm and OCI channels; -rc.N uses rc; -preview.N uses npm next and OCI preview; -canary.N uses npm and OCI canary; -nightly.N and -dev.N use nightly; any other prerelease identifier uses next. Every prerelease creates a GitHub prerelease and is explicitly prevented from replacing the stable latest release. The channel policy is tested independently of GitHub Actions and the release preflight checks that all three publishing workflows consume its outputs.
Version monotonicity follows Semantic Versioning precedence, including prerelease identifiers (for example, 0.1.0-rc.10 is later than 0.1.0-rc.2, and final 0.1.0 is later than any 0.1.0-* prerelease). Build metadata does not change precedence. The check considers tags merged into main, excludes the candidate tag itself, and fails closed if tag history cannot be read. Do not tag a version until the npm scope and trusted publisher match the workflow. Every publishing workflow pins refs/remotes/origin/main and uses git merge-base --is-ancestor before continuing. GitHub Release assets receive a GitHub build-provenance attestation only after the independent archive/SBOM/checksum verifier passes. The job requests OIDC and artifact-attestation permissions only within the gated release job. GitHub Release assets are created independently of npm authentication; fix an npm publish failure before announcing registry availability.
FORGE ships a Python SDK from python/pyproject.toml (distribution name FORGE-ALL, import package forge_sdk). The tag-triggered publisher builds both a wheel and source distribution, runs twine check, and preserves the exact files as a workflow artifact before publication.
The PyPI publisher is gated by FORGE_RELEASE_ENABLED, the release-freeze check, the annotated signed tag and pinned release fingerprint, the approved support-window record, and the protected GitHub environment named pypi. That environment must require at least one independent reviewer, prevent self-review and permit the exact v*.*.* tag pattern. The workflow audits the environment configuration and current run approval history before requesting the short-lived PyPI trusted-publisher OIDC token. It checks out the current trusted release-verification tools separately from the selected tag so an older tag can still use the current pypi environment policy. Configure the PyPI Trusted Publisher for owner NetCore-Technologies, repository FORGE, workflow filename publish-pypi.yml and environment pypi; no long-lived PyPI token is stored in GitHub.
Before building, the workflow queries the exact FORGE-ALL version on PyPI. If any file already exists for that version, the whole build and publish path is skipped so an existing wheel can never be combined with a source distribution from a different build. The protected publish path repeats the version check after the build to catch a version uploaded while the build was running. skip-existing: true remains as a final race-condition guard; it never overwrites an existing file. The initial 0.0.1 attempt was rejected because the exact wheel already existed, so this retry leaves the existing PyPI version untouched. See PyPI trusted publishers and the publisher action's skip-existing option.
FORGE is pre-1.0. Use semantic versioning with 0.y.z: increment z for compatible fixes and y for new functionality that may change the pre-1.0 API. Document breaking CLI, GUI or configuration changes in release notes.
For a local or downloaded candidate bundle, npm run verify:provenance -- dist .github/workflows/release-assets.yml verifies each subject with GitHub CLI against its repository, SLSA v1 predicate, signer workflow and source tag. It requires GH_TOKEN, GITHUB_REPOSITORY, and GITHUB_REF (or equivalent local environment values) and does not publish.
Every release candidate is checked against npm's measured archive metadata. The hard limits are 10 MiB compressed, 30 MiB unpacked, 5 MiB per file and 250 files. The checker validates size, unpackedSize and each file's byte count, and fails closed when npm omits measurements or the unpacked total is inconsistent. Any increase to these limits should be justified by a reviewed change to the release budget and changelog.
The reproducibility gate runs npm pack --ignore-scripts twice into separate private temporary directories and compares the complete archive bytes and SHA-256 digests. The archive must be a regular non-symlink file under the 250 MiB safety ceiling. Temporary directories are removed even when packing or comparison fails. This runs as part of npm run check, including the non-publishing candidate workflow and both gated publishing jobs.
Run the reproducibility check locally with:
npm run check:package-reproduciblePlace one Markdown file per change in changes/unreleased/. Each file starts with a strict metadata block:
---
type: Added
summary: Add an auditable package verification report.
breaking: false
---
Optional implementation detail for the release note.Allowed types are Added, Changed, Fixed, Security, Removed, Deprecated and Breaking. Breaking changes must use type: Breaking, set breaking: true, and include actionable migration: guidance. The parser rejects symlinks, unsupported metadata keys, duplicate fragment names, placeholders and oversized files.
Run npm run check:release-fragments as part of normal validation. Preview a versioned entry without changing the changelog:
npm run release:notes -- --version 0.2.0 --date 2026-11-28After reviewing the generated output, explicitly add --write to insert it at the top of CHANGELOG.md. The generator refuses duplicate versions; CI validation never edits changelog history.
The review-artifact retention policy is enforced by npm run check:release:
| Workflow | Artifact | Retention |
|---|---|---|
| Release candidate readiness | forge-release-preflight-<commit> |
14 days |
| Packaging validation | forge-deb-apt-validation-<commit> |
7 days |
| Signed APT candidate | forge-apt-repository-candidate-<commit> |
14 days |
Every upload must declare its artifact name, explicit paths and if-no-files-found: error. The release checker rejects retention extensions beyond the reviewed values, missing upload steps, renamed artifacts or uploads that silently tolerate missing files. Formal GitHub Release assets remain attached to the versioned Release; this policy applies to temporary Actions review artifacts.
The non-publishing release-readiness workflow accepts an optional candidate version on manual dispatch. When supplied, it checks the official npm registry for that exact package/version before building the candidate. An existing version blocks the run; a 404 package response or an unused version is reported as version-free. A 404 does not verify npm organisation publish permissions. Rate limits, transient server failures and network errors are retried a bounded number of times, then fail closed as “availability unknown”. This check does not reserve the version, create a tag or publish anything. Ordinary branch-push preflights do not query npm availability.
The release preflight statically audits .github/workflows/npm-publish.yml before a candidate can pass. It requires the gated publish job to use the protected npm environment, a job-scoped id-token: write permission, Node.js 24, the official npm registry, trusted-publisher-capable npm CLI, and provenance-enabled publication of the exact prebuilt tarball. It rejects repository npm-token secrets, injected NODE_AUTH_TOKEN values and legacy .npmrc authentication.
This verifies the workflow configuration, not the live npm organisation settings. The maintainer must still create the @netcore-technologies npm scope, configure its Trusted Publisher for owner NetCore-Technologies, repository FORGE, workflow npm-publish.yml, and environment npm, and protect that GitHub environment with the required reviewers.
npm run mirror:artifacts -- dist /mnt/mirror-a /mnt/mirror-b replicates a verified release bundle into one or more pre-provisioned local directories. The source and all targets must be separate real directories. The command validates archive, SBOM, checksums and any detached signatures; refuses extra files, symlinks, changed content and conflicting destination files; confirms every mirrored byte; and rolls back newly created files if a later destination fails. Replication is idempotent when destination bytes already match. Remote object-store backends are not implied by this local-directory implementation.
Every successful mirror writes a deterministic sidecar at MIRROR_DIRECTORY.forge-mirror.json. The sidecar records package identity, sorted bundle filenames, byte sizes, SHA-256 digests, detached signature status and pinned signer fingerprints. It is stored outside the release bundle and does not alter signed package/SBOM/checksum contents. Re-verify a replica with npm run verify:mirror -- /mnt/forge-mirror-a; changed files, incomplete bundles, unexpected signers or sidecar tampering fail closed.
Before npm publication, the gated job requests a short-lived GitHub Actions ID token with audience npm:registry.npmjs.org. FORGE verifies the JWT RS256 signature against GitHub's published JWKS, then checks issuer, exact audience, repository, semantic-version tag ref, push or workflow_dispatch event, GitHub-hosted runner and exact npm-publish.yml workflow reference. A manual dispatch is accepted only when it targets the exact existing version tag; branch dispatches and other events are rejected. The token is never printed or written to disk. npm still independently enforces the Trusted Publisher configuration during token exchange.
The npm and release publishing jobs use separate GitHub Environments. Before publishing or creating a GitHub Release, each gated job reads its environment protection metadata with a job-scoped actions: read token and requires at least one valid User or Team reviewer, prevent_self_review: true, custom deployment patterns enabled, protected-branch-only deployment disabled, and the exact v*.*.* policy pattern. The release workflows themselves trigger only on semantic-version tags. GitHub's deployment-policy list response returns policy IDs and names but does not include the branch/tag type; the audit does not claim otherwise. The tag-only workflow trigger and the environment's own ref matching jointly provide the release restriction.
To configure the environments, open repository Settings → Environments and create npm and release. Add at least one maintainer or reviewer team to each required-reviewer rule, enable Prevent self-review, set custom deployment policies, and add the v*.*.* pattern. The workflow audit is read-only and never creates or changes an environment. The one-time manual workflow Release environment audit can check configuration without creating a tag or release.
After a gated job passes its GitHub Environment protection, it reads the current workflow run's review history through GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals. The verifier requires an approved record for the exact npm or release environment, a valid reviewer user ID/login, and a reviewer ID distinct from the actor who pushed the release tag. It deduplicates reviewer IDs, ignores approval comments, and requires the configured minimum number of independent reviewers. The action uses only job-scoped actions: read permission; it does not approve, reject or otherwise mutate deployments, and it does not log or persist the access token.
Each publishing path passes through two separate protected GitHub Environments in sequence. The npm workflow first requires an independent reviewer for the release environment, then a different reviewer for npm. The GitHub Release workflow uses the reverse order. Before publishing, the current workflow-run approval-history verifier requires an approved record for both environments and rejects any reviewer ID reused across the two approvals or matching the release-tag pusher. This is enforced from the GitHub API approval history, not merely by checking that reviewers are configured. Configure disjoint reviewer groups for the npm and release environments in repository Settings → Environments.
Formal release publishing is blocked during configured maintenance, security-response or incident windows. Configure the repository variable FORGE_RELEASE_FREEZE_WINDOWS as a JSON array. The variable may be empty or omitted when no freeze is scheduled.
Each entry requires a unique lowercase id, canonical UTC start and end timestamps, and a plain-text reason:
[
{
"id": "holiday-maintenance",
"start": "2026-12-24T00:00:00.000Z",
"end": "2027-01-02T00:00:00.000Z",
"reason": "Holiday change freeze; security fixes remain handled through the incident process."
}
]A window is active when the current UTC time is greater than or equal to its start and strictly earlier than its end. Intervals must be valid, unique and non-overlapping. The validator accepts at most 64 windows and 32 KiB of configuration, rejects unknown fields and malformed timestamps, and fails closed when configuration is invalid. There is no workflow input or environment-variable override that bypasses an active freeze.
The same verifier runs before the first protected release approval in both publishing workflows, again as part of the full candidate/package checks, on candidate-readiness runs, and before a versioned OCI image is published. Development-branch image builds are not release publications and are not blocked by a release freeze.
Validate configuration locally:
FORGE_RELEASE_FREEZE_WINDOWS='[]' npm run check:release-freezeA configured active window returns a non-zero exit status and prints its ID, interval and reason. Invalid configuration also returns non-zero so a typo cannot silently disable the release gate.
The weekly schedule is 23 4 * * 1 (Monday at 04:23 UTC, outside the top of the hour). GitHub only starts scheduled workflows when the workflow file is present on the default branch; after promotion there, the scheduled job checks out latest/development rather than building the default branch's potentially older source. Push-triggered development checks remain pinned to their triggering commit.
Each run validates the project, audits dependencies, builds the exact npm archive without lifecycle scripts, generates the SPDX SBOM, verifies checksums and archive contents, uploads a review-only artifact for 14 days, and writes a run summary with the prepared source SHA. It does not create tags, GitHub Releases, npm publications or OCI images. A freeze window or failed verification prevents the artifact from being produced. Manual dispatch remains available for a reviewed, branch-selected run.
Every successful non-publishing candidate preparation writes a separate dist-promotion-record.json beside the package bundle. The record binds the package name/version, source repository/ref/full commit SHA, preparation workflow path, Actions run ID/attempt/URL, UTC preparation time, and SHA-256 plus byte size for the npm archive, SPDX SBOM and SHA256SUMS file.
Create and verify a record locally after building and verifying a candidate bundle:
npm run check
npm pack --ignore-scripts --pack-destination dist
npm sbom --sbom-format spdx > dist/forge.spdx.json
(cd dist && sha256sum *.tgz *.spdx.json > SHA256SUMS && sha256sum --check SHA256SUMS)
node scripts/verify-release-artifacts.js dist
FORGE_CANDIDATE_SOURCE_SHA="$(git rev-parse HEAD)" \
FORGE_CANDIDATE_SOURCE_REF="refs/heads/latest/development" \
FORGE_CANDIDATE_WORKFLOW_PATH=".github/workflows/release-readiness.yml" \
GITHUB_REPOSITORY="NetCore-Technologies/FORGE" \
npm run release:record -- create dist dist-promotion-record.json
npm run release:record -- verify dist dist-promotion-record.jsonThe record uses canonical JSON and a SHA-256 content digest/record ID. Verification reopens the current artifact files without following symlinks, rechecks the package/SBOM/checksum bundle, and compares all recorded sizes and hashes. The record is written exclusively; it refuses to overwrite an existing record and is stored outside the verified three-file artifact bundle.
A promotion record is not a digital signature, GitHub Environment approval, provenance attestation or publish authorization. It records an unpublished candidate in the candidate-review state with zero approvals. Reviewers must still use the protected release environments and the independent two-person approval checks. A changed record or artifact fails verification; a party able to rewrite both the record and its digest can recompute the digest, so treat the record as portable integrity metadata rather than cryptographic proof.
A signed annotated tag such as v0.2.0-canary.1 is classified as the canary channel. The exact verified tag output selects npm dist-tag canary and OCI tag canary; GitHub marks the release as a prerelease and does not move the stable latest release pointer. Canary tags still have to be newer than every version already merged into main, match package.json, pass the artifact/SBOM/checksum/signature/provenance gates, and receive distinct approval from the protected release and npm environments. The job-level FORGE_RELEASE_ENABLED switch remains the master off-by-default control for canary, prerelease and stable publication alike. Adding the channel does not create a tag, enable the switch, or publish a package.
A tag-triggered image release is built once for linux/amd64 and linux/arm64, and Buildx returns the pushed manifest-list digest. The initial publication uses only the immutable source-commit SHA tag. The signed release tag and channel alias are not included as direct build tags.
After the build succeeds, promote-container-digest.js first inspects the immutable ghcr.io/netcore-technologies/forge@sha256 reference and confirms that the registry reports the exact digest returned by the build action. It inspects destination tags before writing: an existing version tag that already points to the exact digest is skipped, while a version tag pointing elsewhere is never overwritten and fails closed. An existing channel alias that already points to the requested digest is skipped; a stale mutable channel alias is moved to the new release digest and verified. Each created or updated destination is inspected again and must resolve to the exact original digest. A missing, malformed or different source digest stops the release job.
The signed annotated tag verifier remains the source of the channel value; the promotion tool independently classifies the tag and rejects a channel mismatch. Docker commands run as argument arrays without a shell and have bounded time/output. This promotion step does not rebuild the image or silently select a mutable source alias.
Run the verifier tests locally with: npm test -- test/container-digest-promotion.test.js. To promote an approved image, use npm run promote:container-digest -- IMAGE SHA256_DIGEST RELEASE_TAG VERIFIED_CHANNEL_TAG.
The command mutates registry tags, so use it only for an explicitly approved release. CI invokes it only for a verified tag after the release switch, signer, support-window and release-freeze gates pass.
The npm publishing job is intentionally stage-only. After the signed annotated tag, both protected GitHub Environments, full checks, archive verification, detached signatures, build provenance and OIDC identity checks pass, CI submits the exact already-built tarball with:
npm stage publish ./dist/*.tgz --access public --tag <verified-channel> --provenanceThe channel is derived from the signed tag and is fixed on the staged package: for example, canary remains canary, beta remains beta, rc remains rc, and a stable tag uses latest. If the wrong channel was selected, reject the stage in the npm UI and submit a corrected release; do not silently move the channel after staging.
A maintainer must inspect the staged version in npmjs.com → Staged Packages and approve it with npm 2FA. This is the final registry promotion from the private staging queue to the public npm registry. The GitHub workflow does not run npm stage approve, because npm requires an interactive 2FA proof for approval; it also never falls back to direct npm publish. The workflow summary records the tag, channel and required manual step. A successful GitHub workflow therefore means staged, not yet publicly published.
See npm staged publishing and npm trusted publishers for the registry-side review and OIDC requirements.
For incident operators, follow the complete previous-version restoration runbook. It covers signature validation, staged-package handling, npm dist-tag restoration, immutable GHCR digest restoration, smoke tests and stop conditions.
The protected GitHub Release workflow builds a release-rollback-manifest.json for each verified release and attaches both the manifest and its detached .asc signature to the GitHub Release. The generator verifies the current annotated tag and pinned signer, selects the newest earlier release in the same SemVer channel, verifies that previous annotated tag with the same pinned signer and checks its historical package.json identity.
Before recording a recovery target it queries the public npm registry for the previous package's SHA-512 integrity and queries GHCR for the previous immutable version tag's OCI manifest digest. The generated canonical-JSON record includes the repository, current and previous source commits, channel-to-dist-tag mapping, previous npm integrity, previous OCI digest/media type, the exact full v-prefixed immutable OCI version tag, current signer fingerprint, five operator confirmations and a content-addressed record ID. The manifest is signed with the pinned release key and its signature is verified before the GitHub Release is created.
Inspect a downloaded manifest and its signature before using its commands:
gpg --verify release-rollback-manifest.json.asc release-rollback-manifest.json
npm run release:rollback -- verify release-rollback-manifest.jsonA rollback target is not selected from a mutable latest, beta or canary alias. The generated npm command restores the previous verified package version to the channel dist-tag; for OCI, the verifier resolves the full v-prefixed immutable tag produced by the container workflow, records Buildx's registry-reported manifest digest, and generates a retag command that uses that immutable sha256: digest. The script only creates and verifies instructions. It does not run npm dist-tag add, retag a container, delete a GitHub Release, or execute a rollback. An absent previous release in the same channel is recorded explicitly, with no invented fallback target. Operator approval and post-rollback smoke/provenance checks remain mandatory.
The deprecation registry is maintained in deprecations/registry.json. Add a validated record before announcing a deprecation; do not publish notices for behaviour that has not actually been scheduled for change. Supported lifecycle states are announced, deprecated, scheduled-for-removal and removed. Each record includes the affected component, introduction/announcement/deprecation/removal versions and dates, impact notice, replacement link and actionable migration guidance.
Preview the rendered page, then write it after review:
npm run deprecations
npm run deprecations -- --write
npm run check:deprecationsnpm run check runs the drift check in CI. The generated docs/DEPRECATIONS.md is a read-only public index; edit the JSON registry, not the generated page. Version/date ordering, state transitions, duplicate identifiers, unsafe links, placeholder copy and file boundaries fail validation. No deprecation is currently registered; the empty registry is intentional and prevents an invented deprecation notice from being published.
Every public versioned release must have one approved record in support/registry.json before npm staging, GitHub Release publication or versioned GHCR image publication can proceed. Each record binds the exact v-prefixed tag, package version, classified channel and configured release signing-key fingerprint. The separately verified annotated tag authenticates the complete source commit and tree before this registry is consulted. It also records the release date, the inclusive last day of full maintenance support, the inclusive last day of security-fix support, support tier, covered scope, policy notes and the exact GitHub Release URL.
The project does not infer support duration from a release channel or apply an assumed 6-, 12- or 24-month promise. Release administrators must approve actual dates and scope. The asOfDate field is the date used to calculate the public status. The generated docs/SUPPORT.md reports full-support, security-only, end-of-life and planned windows. A tag-triggered release is blocked when its matching entry is missing, does not match the verified tag identity or pinned signer, has not reached its release date, or is already outside its support window.
Preview and regenerate the support page with:
npm run support:windows
npm run support:windows -- --write
npm run check:supportTo verify a release after its annotated tag has been cryptographically validated, use:
npm run support:windows -- --verify-release --tag "$FORGE_RELEASE_TAG" --signer "$FORGE_RELEASE_SIGNING_FINGERPRINT"Do not copy sample dates or signer fingerprints from tests into the production registry. The checked-in registry initially contains no release records because there are no independently approved support commitments to publish. npm run check verifies the generated page and ensures npm, GitHub Release and versioned container workflows all enforce the same gate before publication.
The machine-readable platform contract is maintained in support/compatibility.json and rendered into docs/COMPATIBILITY.md. It records the package Node.js engine range, actual CI-tested runtime majors, OS-specific installer evidence, Debian candidate status, OCI architectures and publisher tooling prerequisites. The npm run check gate cross-checks this contract against package.json, both source installers, CI and packaging workflows, the Dockerfile, OCI publication workflow and release documentation. Update the contract and regenerate its public page whenever one of those implementation details changes; do not upgrade the documented support level until the corresponding CI coverage exists.