@intentius/chant 0.124.100 → 0.124.102

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 (270) hide show
  1. package/dist/action-pins.d.ts +2 -0
  2. package/dist/action-pins.js +3 -0
  3. package/dist/ci-detect.d.ts +13 -0
  4. package/dist/ci-detect.js +12 -0
  5. package/dist/ci-evidence-claims.d.ts +12 -0
  6. package/dist/ci-evidence-claims.js +12 -0
  7. package/dist/ci-system.d.ts +66 -0
  8. package/dist/ci-system.js +61 -0
  9. package/dist/cli/handlers/build.js +27 -0
  10. package/dist/cli/handlers/release-doctor.d.ts +12 -0
  11. package/dist/cli/handlers/release-doctor.js +118 -0
  12. package/dist/cli/handlers/release-init.d.ts +10 -0
  13. package/dist/cli/handlers/release-init.js +374 -0
  14. package/dist/cli/handlers/release.d.ts +43 -2
  15. package/dist/cli/handlers/release.js +667 -39
  16. package/dist/cli/handlers/run-generate.js +11 -0
  17. package/dist/cli/main.d.ts +2 -0
  18. package/dist/cli/main.js +44 -101
  19. package/dist/cli/parse-args.js +48 -0
  20. package/dist/cli/registry.d.ts +16 -0
  21. package/dist/cli/release-commands/artifacts.d.ts +3 -0
  22. package/dist/cli/release-commands/artifacts.js +14 -0
  23. package/dist/cli/release-commands/candidates.d.ts +3 -0
  24. package/dist/cli/release-commands/candidates.js +16 -0
  25. package/dist/cli/release-commands/changed.d.ts +3 -0
  26. package/dist/cli/release-commands/changed.js +14 -0
  27. package/dist/cli/release-commands/compose.d.ts +3 -0
  28. package/dist/cli/release-commands/compose.js +16 -0
  29. package/dist/cli/release-commands/cut.d.ts +3 -0
  30. package/dist/cli/release-commands/cut.js +50 -0
  31. package/dist/cli/release-commands/doctor.d.ts +3 -0
  32. package/dist/cli/release-commands/doctor.js +14 -0
  33. package/dist/cli/release-commands/export.d.ts +3 -0
  34. package/dist/cli/release-commands/export.js +12 -0
  35. package/dist/cli/release-commands/images.d.ts +3 -0
  36. package/dist/cli/release-commands/images.js +13 -0
  37. package/dist/cli/release-commands/index.d.ts +8 -0
  38. package/dist/cli/release-commands/index.js +52 -0
  39. package/dist/cli/release-commands/init.d.ts +3 -0
  40. package/dist/cli/release-commands/init.js +19 -0
  41. package/dist/cli/release-commands/list.d.ts +3 -0
  42. package/dist/cli/release-commands/list.js +10 -0
  43. package/dist/cli/release-commands/next.d.ts +3 -0
  44. package/dist/cli/release-commands/next.js +13 -0
  45. package/dist/cli/release-commands/publish.d.ts +3 -0
  46. package/dist/cli/release-commands/publish.js +22 -0
  47. package/dist/cli/release-commands/stamp.d.ts +3 -0
  48. package/dist/cli/release-commands/stamp.js +15 -0
  49. package/dist/cli/release-commands/status.d.ts +3 -0
  50. package/dist/cli/release-commands/status.js +17 -0
  51. package/dist/cli/release-commands/tag.d.ts +3 -0
  52. package/dist/cli/release-commands/tag.js +12 -0
  53. package/dist/cli/release-commands/types.d.ts +20 -0
  54. package/dist/cli/release-commands/types.js +1 -0
  55. package/dist/cli/release-commands/verify.d.ts +3 -0
  56. package/dist/cli/release-commands/verify.js +15 -0
  57. package/dist/cli/release-commands/workflow.d.ts +3 -0
  58. package/dist/cli/release-commands/workflow.js +15 -0
  59. package/dist/cloud-lister/index.d.ts +4 -1
  60. package/dist/cloud-lister/index.js +2 -1
  61. package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
  62. package/dist/cloud-lister/kubernetes-components.js +642 -0
  63. package/dist/cloud-lister/kubernetes.d.ts +18 -0
  64. package/dist/cloud-lister/kubernetes.js +26 -1
  65. package/dist/cloud-lister/mask.d.ts +5 -1
  66. package/dist/cloud-lister/mask.js +14 -5
  67. package/dist/components/cli-support.d.ts +1 -1
  68. package/dist/components/cli-support.js +1 -1
  69. package/dist/config-environments.d.ts +8 -1
  70. package/dist/config-environments.js +2 -0
  71. package/dist/config-import.d.ts +1 -1
  72. package/dist/config-import.js +6 -2
  73. package/dist/config-sandbox.d.ts +1 -1
  74. package/dist/config-sandbox.js +3 -3
  75. package/dist/config.d.ts +369 -10
  76. package/dist/config.js +127 -7
  77. package/dist/deep-observation.js +9 -3
  78. package/dist/floor-table.data.js +21 -1
  79. package/dist/forge-remote.d.ts +13 -0
  80. package/dist/forge-remote.js +15 -0
  81. package/dist/lexicon.d.ts +45 -4
  82. package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
  83. package/dist/lifecycle/__fixtures__/package-files.js +72 -0
  84. package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
  85. package/dist/lifecycle/__fixtures__/publish-fakes.js +275 -3
  86. package/dist/lifecycle/publish-attachments.d.ts +2 -1
  87. package/dist/lifecycle/publish-attachments.js +19 -2
  88. package/dist/lifecycle/publish-cargo.d.ts +99 -0
  89. package/dist/lifecycle/publish-cargo.js +412 -0
  90. package/dist/lifecycle/publish-credentials.d.ts +1 -1
  91. package/dist/lifecycle/publish-credentials.js +13 -0
  92. package/dist/lifecycle/publish-declaration.d.ts +322 -4
  93. package/dist/lifecycle/publish-declaration.js +340 -9
  94. package/dist/lifecycle/publish-forge.d.ts +45 -2
  95. package/dist/lifecycle/publish-forge.js +434 -34
  96. package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
  97. package/dist/lifecycle/publish-git-ssh.js +30 -4
  98. package/dist/lifecycle/publish-github.d.ts +40 -2
  99. package/dist/lifecycle/publish-github.js +100 -3
  100. package/dist/lifecycle/publish-helm.d.ts +83 -0
  101. package/dist/lifecycle/publish-helm.js +452 -0
  102. package/dist/lifecycle/publish-homebrew.d.ts +7 -9
  103. package/dist/lifecycle/publish-homebrew.js +34 -197
  104. package/dist/lifecycle/publish-index.d.ts +141 -0
  105. package/dist/lifecycle/publish-index.js +719 -0
  106. package/dist/lifecycle/publish-marketplace.js +77 -0
  107. package/dist/lifecycle/publish-maven.d.ts +79 -0
  108. package/dist/lifecycle/publish-maven.js +364 -0
  109. package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
  110. package/dist/lifecycle/publish-mcp-registry.js +305 -0
  111. package/dist/lifecycle/publish-npm.d.ts +27 -1
  112. package/dist/lifecycle/publish-npm.js +216 -3
  113. package/dist/lifecycle/publish-nuget.d.ts +93 -0
  114. package/dist/lifecycle/publish-nuget.js +377 -0
  115. package/dist/lifecycle/publish-oci.d.ts +91 -2
  116. package/dist/lifecycle/publish-oci.js +247 -8
  117. package/dist/lifecycle/publish-package-files.d.ts +16 -0
  118. package/dist/lifecycle/publish-package-files.js +39 -0
  119. package/dist/lifecycle/publish-pypi.d.ts +138 -0
  120. package/dist/lifecycle/publish-pypi.js +657 -0
  121. package/dist/lifecycle/publish-record.d.ts +6 -3
  122. package/dist/lifecycle/publish-record.js +6 -3
  123. package/dist/lifecycle/publish-rubygems.d.ts +84 -0
  124. package/dist/lifecycle/publish-rubygems.js +366 -0
  125. package/dist/lifecycle/publish-signing.d.ts +147 -0
  126. package/dist/lifecycle/publish-signing.js +257 -0
  127. package/dist/lifecycle/publish-targets.d.ts +37 -1
  128. package/dist/lifecycle/publish-targets.js +102 -0
  129. package/dist/lifecycle/publish-tauri.js +43 -0
  130. package/dist/lifecycle/publish-train-names.d.ts +57 -0
  131. package/dist/lifecycle/publish-train-names.js +123 -0
  132. package/dist/lifecycle/publish-verify.d.ts +121 -0
  133. package/dist/lifecycle/publish-verify.js +130 -0
  134. package/dist/lifecycle/query.js +8 -0
  135. package/dist/lifecycle/release-artifacts.d.ts +290 -0
  136. package/dist/lifecycle/release-artifacts.js +808 -0
  137. package/dist/lifecycle/release-changelog.d.ts +13 -1
  138. package/dist/lifecycle/release-changelog.js +35 -2
  139. package/dist/lifecycle/release-cut.d.ts +64 -4
  140. package/dist/lifecycle/release-cut.js +147 -34
  141. package/dist/lifecycle/release-doctor.d.ts +113 -0
  142. package/dist/lifecycle/release-doctor.js +1198 -0
  143. package/dist/lifecycle/release-green.d.ts +86 -0
  144. package/dist/lifecycle/release-green.js +286 -0
  145. package/dist/lifecycle/release-init-registries.d.ts +48 -0
  146. package/dist/lifecycle/release-init-registries.js +97 -0
  147. package/dist/lifecycle/release-init.d.ts +275 -0
  148. package/dist/lifecycle/release-init.js +984 -0
  149. package/dist/lifecycle/release-intents.d.ts +73 -0
  150. package/dist/lifecycle/release-intents.js +128 -0
  151. package/dist/lifecycle/release-next.d.ts +111 -0
  152. package/dist/lifecycle/release-next.js +251 -0
  153. package/dist/lifecycle/release-prerelease.d.ts +19 -0
  154. package/dist/lifecycle/release-prerelease.js +30 -0
  155. package/dist/lifecycle/release-publish.d.ts +256 -10
  156. package/dist/lifecycle/release-publish.js +247 -35
  157. package/dist/lifecycle/release-status-change.d.ts +226 -0
  158. package/dist/lifecycle/release-status-change.js +478 -0
  159. package/dist/lifecycle/release-status.d.ts +11 -0
  160. package/dist/lifecycle/release-status.js +1 -1
  161. package/dist/lifecycle/release-store.d.ts +73 -2
  162. package/dist/lifecycle/release-store.js +32 -1
  163. package/dist/lifecycle/release-tag.d.ts +142 -0
  164. package/dist/lifecycle/release-tag.js +322 -0
  165. package/dist/lifecycle/release-verify.d.ts +73 -1
  166. package/dist/lifecycle/release-verify.js +117 -2
  167. package/dist/lifecycle/release-version-formats.d.ts +73 -0
  168. package/dist/lifecycle/release-version-formats.js +570 -0
  169. package/dist/lifecycle/release-version.d.ts +58 -10
  170. package/dist/lifecycle/release-version.js +164 -36
  171. package/dist/lifecycle/release-workstation.d.ts +3 -2
  172. package/dist/lifecycle/release-workstation.js +3 -2
  173. package/dist/op/generate-pipeline.js +1 -1
  174. package/dist/op/local-executor.d.ts +1 -1
  175. package/dist/op/local-executor.js +2 -2
  176. package/dist/op/op-waves-evidence.js +9 -2
  177. package/dist/pr-forge-base.js +4 -2
  178. package/dist/pr-forge.d.ts +20 -2
  179. package/dist/pr-forge.js +46 -10
  180. package/dist/release-floors.d.ts +8 -1
  181. package/dist/release-floors.js +9 -2
  182. package/dist/sensitive-key.d.ts +12 -0
  183. package/dist/sensitive-key.js +52 -0
  184. package/dist/tool-pins.d.ts +40 -0
  185. package/dist/tool-pins.js +66 -0
  186. package/dist/ts-loader.d.ts +8 -0
  187. package/dist/ts-loader.js +19 -0
  188. package/dist/wave-runtime.mjs +345 -342
  189. package/dist/workspace/ci-forge.d.ts +17 -0
  190. package/dist/workspace/ci-forge.js +17 -0
  191. package/dist/workspace/ci-init.js +1 -1
  192. package/dist/workspace/composites.schema.json +1 -0
  193. package/dist/workspace/declaration.d.ts +8 -0
  194. package/dist/workspace/declaration.js +12 -0
  195. package/dist/workspace/declaration.schema.json +8 -0
  196. package/dist/workspace/environments.d.ts +2 -0
  197. package/dist/workspace/environments.js +1 -1
  198. package/dist/workspace/identity-gate-rule.d.ts +61 -5
  199. package/dist/workspace/identity-gate-rule.js +81 -12
  200. package/dist/workspace/lexicon-outputs.d.ts +1 -1
  201. package/dist/workspace/lexicon-outputs.js +1 -1
  202. package/dist/workspace/member-pipeline.d.ts +2 -1
  203. package/dist/workspace/member-pipeline.js +5 -2
  204. package/dist/workspace/reason-codes.d.ts +2 -0
  205. package/dist/workspace/reason-codes.js +3 -1
  206. package/dist/workspace/release-changed.d.ts +75 -4
  207. package/dist/workspace/release-changed.js +205 -34
  208. package/dist/workspace/release-changed.schema.json +20 -2
  209. package/dist/workspace/release-steps/artifacts.d.ts +7 -0
  210. package/dist/workspace/release-steps/artifacts.js +45 -0
  211. package/dist/workspace/release-steps/builds.d.ts +12 -0
  212. package/dist/workspace/release-steps/builds.js +38 -0
  213. package/dist/workspace/release-steps/doctor.d.ts +8 -0
  214. package/dist/workspace/release-steps/doctor.js +14 -0
  215. package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
  216. package/dist/workspace/release-steps/goreleaser.js +36 -0
  217. package/dist/workspace/release-steps/green.d.ts +3 -0
  218. package/dist/workspace/release-steps/green.js +6 -0
  219. package/dist/workspace/release-steps/images.d.ts +22 -0
  220. package/dist/workspace/release-steps/images.js +59 -0
  221. package/dist/workspace/release-steps/index.d.ts +9 -0
  222. package/dist/workspace/release-steps/index.js +50 -0
  223. package/dist/workspace/release-steps/nfpm.d.ts +13 -0
  224. package/dist/workspace/release-steps/nfpm.js +29 -0
  225. package/dist/workspace/release-steps/nuget.d.ts +14 -0
  226. package/dist/workspace/release-steps/nuget.js +16 -0
  227. package/dist/workspace/release-steps/pypi.d.ts +15 -0
  228. package/dist/workspace/release-steps/pypi.js +21 -0
  229. package/dist/workspace/release-steps/qemu.d.ts +21 -0
  230. package/dist/workspace/release-steps/qemu.js +35 -0
  231. package/dist/workspace/release-steps/signing.d.ts +18 -0
  232. package/dist/workspace/release-steps/signing.js +30 -0
  233. package/dist/workspace/release-steps/stamp.d.ts +3 -0
  234. package/dist/workspace/release-steps/stamp.js +4 -0
  235. package/dist/workspace/release-steps/targets.d.ts +31 -0
  236. package/dist/workspace/release-steps/targets.js +40 -0
  237. package/dist/workspace/release-steps/types.d.ts +104 -0
  238. package/dist/workspace/release-steps/types.js +2 -0
  239. package/dist/workspace/release-steps/verify.d.ts +3 -0
  240. package/dist/workspace/release-steps/verify.js +4 -0
  241. package/dist/workspace/release-toolchains.d.ts +59 -0
  242. package/dist/workspace/release-toolchains.js +133 -0
  243. package/dist/workspace/release-train-workflow.d.ts +36 -0
  244. package/dist/workspace/release-train-workflow.js +121 -0
  245. package/dist/workspace/release-train.d.ts +3 -1
  246. package/dist/workspace/release-train.js +20 -3
  247. package/dist/workspace/release-workflow.d.ts +183 -59
  248. package/dist/workspace/release-workflow.js +570 -201
  249. package/dist/workspace/releases.schema.json +70 -1
  250. package/dist/workspace/search-contract.d.ts +1 -1
  251. package/dist/workspace/security.js +9 -2
  252. package/dist/workspace/train-cut.d.ts +182 -0
  253. package/dist/workspace/train-cut.js +504 -0
  254. package/dist/workspace/train-prepare.d.ts +64 -0
  255. package/dist/workspace/train-prepare.js +313 -0
  256. package/dist/workspace/train-publish.d.ts +177 -0
  257. package/dist/workspace/train-publish.js +574 -0
  258. package/dist/workspace/train-range-labels.d.ts +33 -0
  259. package/dist/workspace/train-range-labels.js +109 -0
  260. package/dist/workspace/train-shell.d.ts +5 -0
  261. package/dist/workspace/train-shell.js +17 -0
  262. package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
  263. package/dist/workspace/trust/check-evidence-report.js +3 -7
  264. package/dist/workspace/trust/seal.d.ts +13 -3
  265. package/dist/workspace/trust/seal.js +14 -4
  266. package/dist/workspace/work-cli.d.ts +3 -2
  267. package/dist/workspace/work-cli.js +3 -2
  268. package/dist/workspace/workspace-ledger.d.ts +14 -1
  269. package/dist/workspace/workspace-ledger.js +33 -7
  270. package/package.json +1 -1
@@ -1,17 +1,20 @@
1
+ import { type MemberTags } from "../lifecycle/release-tag.js";
1
2
  import type { SecurityGroup } from "./security.js";
2
3
  import type { OpSetupStep } from "../lexicon.js";
4
+ import { type ReleaseBuildConfig, type ReleaseToolchainDecl } from "./release-toolchains.js";
5
+ import { type ReleaseWorkflowContext } from "./release-steps/index.js";
3
6
  export declare const RELEASE_WORKFLOW_FORGES: readonly ["github", "forgejo", "gitlab"];
4
7
  export type ReleaseWorkflowForge = (typeof RELEASE_WORKFLOW_FORGES)[number];
5
8
  /** Where each forge's publish workflow is written, relative to the repository root. */
6
9
  export declare const RELEASE_WORKFLOW_FILES: Record<ReleaseWorkflowForge, string>;
7
10
  /** `release.workflow` in `chant.config.ts` (#4656): how the release pipeline starts and what it runs. */
8
11
  export interface ReleasePipelineConfig {
9
- /** `tag` (default): the publish job runs on a `release/**` tag. `dispatch`: the whole release starts by hand with a label. */
12
+ /** `tag` (default): the publish job runs on the tag the cut made (`release.tag`, default `release/**`). `dispatch`: the whole release starts by hand with a label. */
10
13
  trigger?: "tag" | "dispatch";
11
14
  /** For `dispatch`: the commit to cut. `last-green` (default) is the newest green commit at or below the dispatched one; `head` is the dispatched commit, which must be green. */
12
15
  gate?: "last-green" | "head";
13
- /** The command that installs what the build needs. Default `npm ci`. */
14
- install?: string;
16
+ /** The command that installs what the build needs. Default `npm ci` for a project with a package.json, none otherwise. `false` for none. */
17
+ install?: string | false;
15
18
  /** The command that builds what the targets upload, run by the cut (as its `--build`) and the publish job. `false` for none. Default `npm run build`. */
16
19
  build?: string | false;
17
20
  /** What runs chant. Default `npx chant`. */
@@ -39,15 +42,46 @@ export interface ReleasePipelineConfig {
39
42
  * the platforms `release.images` builds is set up without one (#4876).
40
43
  */
41
44
  setup?: OpSetupStep[];
45
+ /**
46
+ * The toolchains the jobs set up (#5152): `node`, `go`, `python`, `rust`,
47
+ * `java`, each by name or as `{ name, version }`. Default: those the
48
+ * project's root files name (`package.json`, `go.mod`, `pyproject.toml`,
49
+ * `Cargo.toml`, `pom.xml`, ...). Jobs that run chant get Node as well.
50
+ * `false` sets up nothing; the runner brings its own. GitHub and Forgejo;
51
+ * GitLab jobs take theirs from the runner's image and refuse it by name.
52
+ */
53
+ toolchains?: ReleaseToolchainDecl[] | false;
54
+ /**
55
+ * Per-platform build jobs (#5152), each on its own runner (a native arm64
56
+ * runner, macOS, Windows), run after the gate and before the cut. Each
57
+ * hands its `outputs` to the cut and publish jobs, where they land at the
58
+ * same paths in the checkout before `chant release cut` runs. `dispatch`
59
+ * only: with the tag trigger the release was cut before the workflow ran.
60
+ */
61
+ builds?: ReleaseBuildConfig[];
42
62
  /** Where the workflow is written, from the repository root, such as `.github/workflows/publish.yml` for an npm trusted publisher that names that file. Default {@link RELEASE_WORKFLOW_FILES}. */
43
63
  file?: string;
64
+ /**
65
+ * Run `chant release doctor` before anything is published (#5161). With
66
+ * `trigger: "dispatch"` the cut job runs it before the cut, so a target
67
+ * that can't publish stops the release before a tag exists; on by default
68
+ * there, `false` turns it off. With `trigger: "tag"` the cut already
69
+ * happened, and `true` runs it in the publish job before the build.
70
+ */
71
+ doctor?: boolean;
44
72
  }
45
73
  export interface ReleaseWorkflowInput {
46
74
  forge: ReleaseWorkflowForge;
47
75
  /** The security groups the workspace opts into at its root. */
48
76
  groups: ReadonlySet<SecurityGroup>;
49
- /** The command that installs what the build needs. Default `npm ci`. */
50
- install?: string;
77
+ /** The command that installs what the build needs, or none. Default `npm ci`. */
78
+ install?: string | null;
79
+ /**
80
+ * The toolchain files at the project's root (#5152), from
81
+ * `TOOLCHAIN_MARKERS`: what the jobs set up when `release.workflow.toolchains`
82
+ * names none. Absent, the jobs set up Node alone, as they always did.
83
+ */
84
+ projectFiles?: readonly string[];
51
85
  /** The command that builds what the targets upload, or none. Default `npm run build`. */
52
86
  build?: string | null;
53
87
  /** What runs chant. Default `npx chant`. */
@@ -74,6 +108,49 @@ export interface ReleaseWorkflowInput {
74
108
  imagePlatforms?: string[];
75
109
  /** `release.lane` (#4692): the gate's green lane. */
76
110
  lane?: string;
111
+ /**
112
+ * The config declares `release.artifacts` (#5151). In a dispatched release
113
+ * the cut job stages the files it built (`chant release artifacts --no-build
114
+ * -o`) and hands them to the publish job as the workflow artifact
115
+ * {@link RELEASE_ARTIFACTS_ARTIFACT}, which checks them against the record
116
+ * (`--from`) before the publish. On a release tag the publish job builds
117
+ * them again and checks them.
118
+ */
119
+ artifacts?: boolean;
120
+ /**
121
+ * An entry of `release.artifacts` is built by goreleaser (#5151): the job
122
+ * that builds the files installs the goreleaser {@link TOOL_PINS} pins,
123
+ * checked by SHA-256, and on GitHub and Forgejo sets up Go from the
124
+ * member's `go.mod`.
125
+ */
126
+ goreleaser?: boolean;
127
+ /**
128
+ * An entry of `release.artifacts` is packaged by nfpm (#5233): the job that
129
+ * builds the files installs the nfpm {@link TOOL_PINS} pin, checked by
130
+ * SHA-256, and names it in `CHANT_NFPM`.
131
+ */
132
+ nfpm?: boolean;
133
+ /**
134
+ * The green gate the cut checks (#5149), `release.green` resolved. Under
135
+ * `forge-checks` or `none` a dispatched release's gate names the
136
+ * dispatched commit, since no `ci/green` tag exists to search, and the cut
137
+ * checks it; under `forge-checks` the cut job gets the run's token and,
138
+ * on GitHub, `checks: read` and `statuses: read`. Default `chant`.
139
+ */
140
+ green?: import("../lifecycle/release-green.js").ReleaseGreenSource;
141
+ /**
142
+ * `release.tag` (#5150) and where it renders. A tag-triggered workflow runs
143
+ * on the tags it makes, and its publish job reads the label of the tag that
144
+ * started it from the ledger (`chant release tag`). Absent, or the legacy
145
+ * default: the `release/**` file it always was.
146
+ */
147
+ tags?: MemberTags;
148
+ /**
149
+ * The publish signs with Sigstore (#5164): `release.signing` or the
150
+ * `supply-chain` group, with an `oci` or `forge` target. The jobs download
151
+ * cosign pinned by SHA-256 ({@link cosignSetup}).
152
+ */
153
+ signing?: boolean;
77
154
  /**
78
155
  * The config declares `release.version` (#4840): the publish job runs
79
156
  * `chant release stamp <label>` before the images and the build, so what
@@ -87,6 +164,14 @@ export interface ReleaseWorkflowInput {
87
164
  * token unless `release.workflow.env` sets it.
88
165
  */
89
166
  publish?: ReadonlyArray<ReleaseWorkflowTarget>;
167
+ /**
168
+ * `release.train` at the workspace root (#5154): the workflow releases the
169
+ * root's members as a train, recorded for `env`, rather than the root as
170
+ * one member. See ./release-train-workflow.ts.
171
+ */
172
+ train?: {
173
+ env: string;
174
+ };
90
175
  }
91
176
  /** What the generator reads of a `release.publish` target: enough to know which credentials and tools its job needs. */
92
177
  export interface ReleaseWorkflowTarget {
@@ -99,67 +184,106 @@ export interface ReleaseWorkflowTarget {
99
184
  passwordEnv?: string;
100
185
  /** An `npm` target's registry. */
101
186
  registry?: string;
187
+ /** A `pypi` target's `auth`, `index` and `uploadUrl`. */
188
+ auth?: string;
189
+ /** A `pypi` target's index name, or a `helm` target's chart repository (#5233). */
190
+ index?: string | {
191
+ repo: string;
192
+ };
193
+ uploadUrl?: string;
194
+ /** A `helm` target's registry (#5233). */
195
+ oci?: {
196
+ repository: string;
197
+ usernameEnv?: string;
198
+ passwordEnv?: string;
199
+ };
200
+ /** A `nuget` target's `pushUrl` (#5232). */
201
+ pushUrl?: string;
102
202
  }
103
- /** npm trusted publishing needs this npm or later (#4786). */
104
- export declare const NPM_TRUSTED_PUBLISHING_MIN = "11.5.1";
105
- /** The npm a publish job installs when the runner's Node bundles one older than {@link NPM_TRUSTED_PUBLISHING_MIN}. */
106
- export declare const NPM_TRUSTED_PUBLISHING_VERSION = "11.19.0";
107
- /**
108
- * The shell line that installs {@link NPM_TRUSTED_PUBLISHING_VERSION} when the
109
- * runner's npm is older than {@link NPM_TRUSTED_PUBLISHING_MIN}, and prints the
110
- * npm in use.
111
- */
112
- export declare const NPM_TRUSTED_PUBLISHING_SETUP = "have=\"$(npm --version)\"; if [ \"$(printf '%s\\n' \"11.5.1\" \"$have\" | sort -V | head -n1)\" != \"11.5.1\" ]; then npm install -g npm@11.19.0; fi; npm --version";
203
+ export { RELEASE_RUNNER_PLATFORM } from "./release-steps/types.js";
204
+ export { NPM_TRUSTED_PUBLISHING_MIN, NPM_TRUSTED_PUBLISHING_SETUP, NPM_TRUSTED_PUBLISHING_VERSION, targetExtras } from "./release-steps/targets.js";
205
+ export { RELEASE_BINFMT_IMAGE, qemuArchitectures, qemuSetup } from "./release-steps/qemu.js";
206
+ export { RELEASE_ARTIFACTS_ARTIFACT, RELEASE_ARTIFACTS_STAGE } from "./release-steps/artifacts.js";
207
+ export { goreleaserSetup } from "./release-steps/goreleaser.js";
208
+ export { cosignSetup } from "./release-steps/signing.js";
209
+ export { RELEASE_DIGESTS_FILE, RELEASE_DIGESTS_PATHS, RELEASE_IMAGES_ARTIFACT } from "./release-steps/images.js";
210
+ /** The flags `chant release publish` gets under the groups. */
211
+ export declare function publishFlags(groups: ReadonlySet<SecurityGroup>): string[];
212
+ /** The workflow file's text, without the generated-by header. */
213
+ export declare function renderReleaseWorkflow(input: ReleaseWorkflowInput): string;
113
214
  /**
114
- * What a GitHub release workflow needs for its targets, worked out from them
115
- * (#4786), so no product wires it by hand:
116
- *
117
- * - an `oci` target on `ghcr.io` that names no credentials pushes with the
118
- * job's token: `packages: write`, and `OCI_USERNAME` and `OCI_PASSWORD`
119
- * from `github.actor` and `github.token`;
120
- * - an `npm` target on npmjs publishes with trusted publishing, which needs
121
- * npm {@link NPM_TRUSTED_PUBLISHING_MIN}: the jobs upgrade npm when the
122
- * runner's is older.
123
- *
124
- * `release.workflow` wins: a scope, variable or the same setup line it names
125
- * is not added again. Other forges, and configs without such targets, get
126
- * nothing.
215
+ * The filters for the tags a template makes (#5150): GitHub and Forgejo
216
+ * globs (the release tags, and a negated pattern for the floating tag so its
217
+ * move starts nothing), and GitLab's rule.
127
218
  */
128
- export declare function targetExtras(forge: ReleaseWorkflowForge, targets: ReadonlyArray<ReleaseWorkflowTarget>, p: ReleasePipelineConfig): Pick<ReleasePipelineConfig, "permissions" | "env" | "setup">;
129
- /** The platform the jobs `chant release workflow` writes run on: GitHub's and Forgejo's `ubuntu-latest`, and a GitLab runner's default (#4876). */
130
- export declare const RELEASE_RUNNER_PLATFORM = "linux/amd64";
131
- /** The binfmt image a GitLab job installs QEMU's handlers with (#4876): the repository, which a config's own setup line is recognised by. */
132
- export declare const RELEASE_BINFMT_IMAGE: string;
133
- /** The architectures among `platforms` the runner can't run, as QEMU names them (`linux/arm/v7` is `arm`), each once. */
134
- export declare function qemuArchitectures(platforms: readonly string[]): string[];
219
+ export declare function releaseTagFilters(tags: MemberTags): {
220
+ globs: string[];
221
+ gitlabRule: string;
222
+ };
223
+ export interface JobExtras {
224
+ /** The scopes the config and the targets add, which the jobs that need them take (#5234). */
225
+ permissions: Array<[string, string]>;
226
+ /** The job's `env:` block with `base` entries first, or nothing when there is neither. */
227
+ githubEnv: (base: string[]) => string[];
228
+ /** Steps after the install. */
229
+ githubSteps: string[];
230
+ /** GitLab: the job's `variables:` entries, under a `variables:` key of their own. */
231
+ gitlabVariables: string[];
232
+ /** GitLab: script lines after the install. */
233
+ gitlabScript: string[];
234
+ }
135
235
  /**
136
- * QEMU's binfmt setup for the platforms `release.images` builds that the
137
- * runner can't, such as `linux/arm64` on an amd64 runner (#4876), so no
138
- * product names it in `release.workflow.setup`. GitHub and Forgejo get
139
- * `docker/setup-qemu-action` at its pin; GitLab a `docker run --privileged`
140
- * of {@link RELEASE_BINFMT_IMAGE} by the digest `IMAGE_PINS.binfmt` records
141
- * (#4941, ../image-pins.ts), which `chant release workflow` notes needs
142
- * an executor that runs privileged containers. A config whose `setup` names
143
- * the action or the binfmt image already gets nothing more, so its file
144
- * renders as it did.
236
+ * A job's `permissions:` block (#5234): the scopes it needs, then the config's
237
+ * and targets' extras it takes, one per line at the job's indent. The workflow
238
+ * itself grants `contents: read`, so no job holds a scope it does not name.
239
+ * The cut never takes `packages` (the publish pushes the images), and the
240
+ * extras the config set by hand go to both.
145
241
  */
146
- export declare function qemuSetup(forge: ReleaseWorkflowForge, platforms: readonly string[], p: ReleasePipelineConfig): OpSetupStep[];
147
- /** The flags `chant release publish` gets under the groups. */
148
- export declare function publishFlags(groups: ReadonlySet<SecurityGroup>): string[];
149
- /** Where `chant release images` writes the digests the publish job's build reads (#4657), by default and at a workstation. */
150
- export declare const RELEASE_DIGESTS_FILE = ".chant/release-digests.json";
242
+ export declare function jobPermissions(extra: Pick<JobExtras, "permissions">, base: Record<string, string>, job: "gate" | "cut" | "publish" | "after", indent?: string): string[];
243
+ /** `release.workflow`'s `permissions`, `env` and `setup` (#4751) as lines of the forge's file. Empty for a config without them, so its file is what it was. */
244
+ export declare function jobExtras(p: ReleasePipelineConfig, forge: ReleaseWorkflowForge): JobExtras;
245
+ /** The checkout and toolchain setup a GitHub or Forgejo job starts with (#5152); `ref` checks out that commit. */
246
+ export declare function githubSetup(ref: string | undefined, setup: readonly string[], persist?: boolean): string[];
247
+ interface DispatchInput {
248
+ /** What the features read (#5196). */
249
+ context: ReleaseWorkflowContext;
250
+ chant: string;
251
+ install: string | null;
252
+ /** The toolchain steps of the gate (Node, for chant) and of the jobs that build (#5152). */
253
+ chantSetup: string[];
254
+ fullSetup: string[];
255
+ /** The per-platform builds (#5152), each with its toolchain steps. */
256
+ builds: Array<ReleaseBuildConfig & {
257
+ setup: string[];
258
+ }>;
259
+ build: string | null;
260
+ root: string | null;
261
+ flags: string;
262
+ after: string[];
263
+ forge: ReleaseWorkflowForge;
264
+ gate: "last-green" | "head";
265
+ lane?: string;
266
+ extra: JobExtras;
267
+ /** The publish job's `GITHUB_TOKEN` line for a GitHub forge target (#4767), or nothing. */
268
+ forgeToken: string[];
269
+ /** The cut job's `GITHUB_TOKEN` line under `forge-checks` (#5149), or nothing. */
270
+ cutToken: string[];
271
+ /** The green gate the cut checks (#5149). */
272
+ green: import("../lifecycle/release-green.js").ReleaseGreenSource;
273
+ /** The cut job runs `chant release doctor` before the cut (#5161), with the publish job's forge token. */
274
+ doctor: boolean;
275
+ }
276
+ /** The node one-liner that prints a JSON document's field from stdin, or from the file its argument names. */
277
+ export declare const field: (path: string) => string;
278
+ /** The gate's shell: the commit to cut, from `ci last-green`, refused when there is none or, under `head`, when it is not the dispatched one. */
279
+ export declare function gateScript(o: Pick<DispatchInput, "green" | "chant" | "lane" | "gate" | "forge">, dispatched: string): string[];
151
280
  /**
152
- * Where a generated publish job writes the digests: the runner's temp
153
- * directory, outside the checkout, so `chant release publish` finds the tree
154
- * as the cut left it (#4853). A repository that commits files under `.chant/`
155
- * can't ignore the directory, and a digests file there made the publish
156
- * refuse with `release-worktree-dirty`.
281
+ * The cut job's fetch of `chant/lifecycle`. A repository's first release has
282
+ * no ledger branch yet, and the cut is what creates it, so a remote without
283
+ * the branch is not an error here; any other failure of git still stops the
284
+ * job. The publish job runs after the cut has pushed it and fetches it plainly.
157
285
  */
158
- export declare const RELEASE_DIGESTS_PATHS: Record<ReleaseWorkflowForge, string>;
159
- /** The workflow file's text, without the generated-by header. */
160
- export declare function renderReleaseWorkflow(input: ReleaseWorkflowInput): string;
161
- /** The workflow artifact the cut job hands its image archives on in. */
162
- export declare const RELEASE_IMAGES_ARTIFACT = "chant-release-images";
286
+ export declare const LEDGER_FETCH_FIRST = "rc=0; git ls-remote --exit-code --heads origin chant/lifecycle >/dev/null || rc=$?; if [ \"$rc\" = 0 ]; then git fetch origin chant/lifecycle:chant/lifecycle; elif [ \"$rc\" != 2 ]; then exit \"$rc\"; fi";
163
287
  /** The header that marks the file generated, naming the command that regenerates it. */
164
288
  export declare function releaseWorkflowHeader(command: string): string;
165
289
  /**