@catladder/cli 5.1.1 → 5.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.d.ts +30 -0
  2. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js +89 -0
  3. package/dist/apps/cli/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.js.map +1 -0
  4. package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js +2 -0
  5. package/dist/apps/cli/src/apps/cli/commands/project/doctor/index.js.map +1 -1
  6. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.d.ts +4 -1
  7. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js +4 -1
  8. package/dist/apps/cli/src/apps/cli/commands/project/githubMergeGating.js.map +1 -1
  9. package/dist/apps/cli/src/catci.js +13 -0
  10. package/dist/apps/cli/src/catci.js.map +1 -1
  11. package/dist/apps/cli/src/release/changesetsReleaseJob.js +20 -42
  12. package/dist/apps/cli/src/release/changesetsReleaseJob.js.map +1 -1
  13. package/dist/apps/cli/src/release/githubDeployKey.d.ts +36 -0
  14. package/dist/apps/cli/src/release/githubDeployKey.js +126 -0
  15. package/dist/apps/cli/src/release/githubDeployKey.js.map +1 -0
  16. package/dist/bundles/catci/index.js +5 -5
  17. package/dist/bundles/catenv/index.js +31 -7
  18. package/dist/bundles/cli/index.js +133 -8
  19. package/dist/bundles/runner-images/semantic-release/Dockerfile +3 -1
  20. package/dist/bundles/runner-images/semantic-release/scripts/semanticRelease +37 -4
  21. package/dist/bundles/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
  22. package/dist/bundles/skills/catladder-pipelines/SKILL.md +3 -2
  23. package/dist/bundles/skills/catladder-releases/SKILL.md +14 -0
  24. package/dist/packages/pipeline/src/backends/github/GithubBackend.js +12 -3
  25. package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
  26. package/dist/packages/pipeline/src/catci/shippedCatci.d.ts +8 -0
  27. package/dist/packages/pipeline/src/catci/shippedCatci.js +19 -4
  28. package/dist/packages/pipeline/src/catci/shippedCatci.js.map +1 -1
  29. package/dist/runner-images/semantic-release/Dockerfile +3 -1
  30. package/dist/runner-images/semantic-release/scripts/semanticRelease +37 -4
  31. package/dist/skills/catladder-migrate-ci-backend/SKILL.md +15 -6
  32. package/dist/skills/catladder-pipelines/SKILL.md +3 -2
  33. package/dist/skills/catladder-releases/SKILL.md +14 -0
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +1 -1
  36. package/src/apps/cli/commands/project/__tests__/checkGithubReleaseWorkflow.test.ts +89 -0
  37. package/src/apps/cli/commands/project/doctor/checkGithubReleaseWorkflow.ts +125 -0
  38. package/src/apps/cli/commands/project/doctor/index.ts +2 -0
  39. package/src/apps/cli/commands/project/githubMergeGating.ts +4 -1
  40. package/src/catci.ts +15 -0
  41. package/src/release/__tests__/githubDeployKey.test.ts +148 -0
  42. package/src/release/changesetsReleaseJob.ts +28 -57
  43. package/src/release/githubDeployKey.ts +141 -0
@@ -183,10 +183,15 @@ skill for the exact command surface.
183
183
  - **GitLab** needs a `GL_TOKEN` project access token (named
184
184
  `semantic-release`) to push the release commit and tag. It is created
185
185
  and rotated by `yarn catladder project setup`.
186
- - **GitHub** needs nothing extra the release jobs use the built-in
187
- `github.token`. Tags pushed by that token do not retrigger workflows,
188
- so the release job dispatches the tagged-release workflow explicitly;
189
- that is built in and needs no configuration.
186
+ - **GitHub** needs the release deploy key that `yarn catladder project
187
+ setup` provisions together with the merge gating (Step 9): the release
188
+ job pushes the release commit and tag over ssh with it, because the
189
+ built-in `github.token` can never bypass the required `catladder ✅`
190
+ check on the default branch (the push fails with GH013 otherwise).
191
+ Without merge gating the job falls back to the token. The release
192
+ commit carries `[skip ci]` and the release job dispatches the
193
+ tagged-release workflow explicitly (one run per tag); that is built
194
+ in and needs no configuration.
190
195
  - **Only one backend should own releases at a time.** Both backends
191
196
  generate release jobs, and with `releases: { when: "auto" }` both would
192
197
  try to tag the same commit. During the parallel phase, agree with the
@@ -287,9 +292,13 @@ now-wrong `gitRemote`, regenerate once more, and finish with
287
292
  token bypass rulesets, so setup provisions a write deploy key
288
293
  ("catladder release", private half in the `CATLADDER_RELEASE_KEY`
289
294
  actions secret; deploy keys never expire) that the release job
290
- pushes with over ssh. Classic branch protection has no bypass list
295
+ pushes with over ssh with both release methods, semantic-release
296
+ and changesets. Classic branch protection has no bypass list
291
297
  at all, which is why setup uses a ruleset and migrates old
292
- classic-protection gating away. `project doctor` verifies all of it.
298
+ classic-protection gating away. `project doctor` verifies all of it,
299
+ including that the committed release workflow runs the release image
300
+ of the installed catladder (an older semantic-release image pushed
301
+ with the token and ignored the key — regenerate with `catenv`).
293
302
  Required reviews stay a human choice.
294
303
  - Tell the team where the pipeline lives now and how manual actions
295
304
  work there (on GitHub, manual jobs are dispatch workflows in the
@@ -70,8 +70,9 @@ jobs). Their definitions are materialized into
70
70
  `.catladder-generated/images/` and built in the project's own registry
71
71
  under `catladder/` (content-hashed, rebuilt only on change).
72
72
  `.catladder-generated/catci/` holds a small bundled CI companion used by
73
- generated jobs (e.g. the release security audit) all generated, never
74
- edit.
73
+ generated jobs (e.g. the release security audit) plus a `package.json`
74
+ pinning the folder to CommonJS (needed when the project's root
75
+ `package.json` has `"type": "module"`) — all generated, never edit.
75
76
 
76
77
  Projects can declare their own job images under `images` in
77
78
  `catladder.ts` (`🐳 image <name>` build jobs, pushed to `job-images/` in
@@ -128,6 +128,20 @@ the `security` commands in the `catladder-cli` reference.
128
128
  MR adding a changeset describing the accumulated work.
129
129
  - Wrong version bump → check commit types (semantic-release) or the bump
130
130
  levels in the changeset files (changesets).
131
+ - GitHub: the push is rejected with `GH013 … Required status check
132
+ "catladder ✅" is expected` (or GH006) → the release push has to use
133
+ the release deploy key, the only actor that bypasses the merge-gating
134
+ ruleset. `yarn catladder project setup` provisions it (deploy key
135
+ `catladder release` + secret `CATLADDER_RELEASE_KEY`), `yarn catladder
136
+ project doctor` verifies it — including that the committed release
137
+ workflow runs the current release image; an older semantic-release
138
+ image pushed with the workflow token and ignored the key (regenerate
139
+ with `yarn catenv` and commit).
140
+ - GitHub, semantic-release with a project-provided `.releaserc`: keep
141
+ `[skip ci]` in the `@semantic-release/git` commit message. The
142
+ deploy-key push triggers workflows, and without the marker the release
143
+ commit starts a main run and the tag a second tagged run next to the
144
+ one the release job dispatches.
131
145
  - Tag pushed but nothing on the releases page → with `changesets` the
132
146
  entry is created via the host api after the push and never fails the
133
147
  job (the release itself is done); look for the `could not create the