Skip to content

docs-kit: the kit as a release file (kit-v2.0.0) - #223

Merged
niden merged 6 commits into
masterfrom
T222-docs-kit-release-file
Dec 5, 2026
Merged

niden merged 6 commits into
masterfrom
T222-docs-kit-release-file

Conversation

@niden

@niden niden commented Dec 5, 2026

Copy link
Copy Markdown
Member

Link to issue: #222

What

A site installs the kit from one file on the GitHub Release of the kit tag, not from the GitHub repository:

"@phalcon/docs-kit": "https://github.com/phalcon/assets/releases/download/kit-v2.0.0/phalcon-docs-kit-2.0.0.tgz"
  • docs-kit/scripts/checks.mjs: the pin check accepts only the release address, and the version of the file must be the version of the tag (releaseAddress(version)).
  • docs-kit/scripts/release-notes.mjs: the notes of a kit version, from docs-kit/CHANGELOG.md.
  • .github/workflows/docs-kit-release.yml (new), on the push of a kit-v* tag:
    • job release (contents: write, the token only in the release step): it checks that the tag is the kit version, packs the kit (pnpm pack), and makes the release with the file and the notes;
    • job check (contents: read): it packs the kit again, compares the file at the release address with the packed file byte by byte, then installs a new site of the starter from that address (a new lock, then an install from the lock into an empty store). A failed check can run again.
  • .github/workflows/docs-kit.yml: the install job builds and checks a copy of the fixture with the packed kit of the commit. The sites job (check-sites.mjs) also installs the packed kit.
  • kit-v2.0.0: the starter pins the release address; docs-kit/CHANGELOG.md (1.1.0 dated); the two READMEs (the release steps, and what to do when a job of the release workflow fails).

Review

  • Kit suite: 158/158 pass.
  • The fixture: pnpm install --force, pnpm build, pnpm test (checks 11, problems 0), pnpm lint:docs, nimbus check, pnpm typecheck (0 errors).
  • The commands of the install job, run locally: pass. With scripts left out of the files list of docs-kit/package.json, the job fails (ERR_MODULE_NOT_FOUND).
  • The first steps of the release job, run locally with kit-v1.1.0: the tag check, the pack and the notes. A wrong tag stops the job. Two packs of the same commit give the same bytes.
  • Only the first release can test the real release address (the check job).

After the merge

  1. Settings, General, Releases: turn on release immutability, before the tag. Then a published release, its file and its tag cannot change.
  2. When the CI of the merge commit is green, tag it: git tag kit-v2.0.0 <merge commit>, then git push origin kit-v2.0.0.
  3. The release workflow makes the release kit-v2.0.0 with phalcon-docs-kit-2.0.0.tgz. If its check job fails because of the network, run the failed job again.

No site on master is on the kit yet. The cli-options-parser site (phalcon/cli-options-parser#71, on kit-v1.1.0) moves to the release address after the release.

niden added 6 commits December 5, 2026 16:45
… the release of the tag

Assisted-by: Claude Code
Assisted-by: Claude Code
…gain

The compare and the install of the release file ran in the release job,
with the write token, after `gh release create`: a run again of a failed
check stopped at the release that exists. They are now a `check` job that
only reads. The README says what to do for each failed job.

Assisted-by: Claude Code
@niden niden self-assigned this Dec 5, 2026
@niden
niden merged commit 1897144 into master Dec 5, 2026
12 checks passed
@niden
niden deleted the T222-docs-kit-release-file branch December 5, 2026 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant