@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.
- package/dist/action-pins.d.ts +2 -0
- package/dist/action-pins.js +3 -0
- package/dist/ci-detect.d.ts +13 -0
- package/dist/ci-detect.js +12 -0
- package/dist/ci-evidence-claims.d.ts +12 -0
- package/dist/ci-evidence-claims.js +12 -0
- package/dist/ci-system.d.ts +66 -0
- package/dist/ci-system.js +61 -0
- package/dist/cli/handlers/build.js +27 -0
- package/dist/cli/handlers/release-doctor.d.ts +12 -0
- package/dist/cli/handlers/release-doctor.js +118 -0
- package/dist/cli/handlers/release-init.d.ts +10 -0
- package/dist/cli/handlers/release-init.js +374 -0
- package/dist/cli/handlers/release.d.ts +43 -2
- package/dist/cli/handlers/release.js +667 -39
- package/dist/cli/handlers/run-generate.js +11 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +44 -101
- package/dist/cli/parse-args.js +48 -0
- package/dist/cli/registry.d.ts +16 -0
- package/dist/cli/release-commands/artifacts.d.ts +3 -0
- package/dist/cli/release-commands/artifacts.js +14 -0
- package/dist/cli/release-commands/candidates.d.ts +3 -0
- package/dist/cli/release-commands/candidates.js +16 -0
- package/dist/cli/release-commands/changed.d.ts +3 -0
- package/dist/cli/release-commands/changed.js +14 -0
- package/dist/cli/release-commands/compose.d.ts +3 -0
- package/dist/cli/release-commands/compose.js +16 -0
- package/dist/cli/release-commands/cut.d.ts +3 -0
- package/dist/cli/release-commands/cut.js +50 -0
- package/dist/cli/release-commands/doctor.d.ts +3 -0
- package/dist/cli/release-commands/doctor.js +14 -0
- package/dist/cli/release-commands/export.d.ts +3 -0
- package/dist/cli/release-commands/export.js +12 -0
- package/dist/cli/release-commands/images.d.ts +3 -0
- package/dist/cli/release-commands/images.js +13 -0
- package/dist/cli/release-commands/index.d.ts +8 -0
- package/dist/cli/release-commands/index.js +52 -0
- package/dist/cli/release-commands/init.d.ts +3 -0
- package/dist/cli/release-commands/init.js +19 -0
- package/dist/cli/release-commands/list.d.ts +3 -0
- package/dist/cli/release-commands/list.js +10 -0
- package/dist/cli/release-commands/next.d.ts +3 -0
- package/dist/cli/release-commands/next.js +13 -0
- package/dist/cli/release-commands/publish.d.ts +3 -0
- package/dist/cli/release-commands/publish.js +22 -0
- package/dist/cli/release-commands/stamp.d.ts +3 -0
- package/dist/cli/release-commands/stamp.js +15 -0
- package/dist/cli/release-commands/status.d.ts +3 -0
- package/dist/cli/release-commands/status.js +17 -0
- package/dist/cli/release-commands/tag.d.ts +3 -0
- package/dist/cli/release-commands/tag.js +12 -0
- package/dist/cli/release-commands/types.d.ts +20 -0
- package/dist/cli/release-commands/types.js +1 -0
- package/dist/cli/release-commands/verify.d.ts +3 -0
- package/dist/cli/release-commands/verify.js +15 -0
- package/dist/cli/release-commands/workflow.d.ts +3 -0
- package/dist/cli/release-commands/workflow.js +15 -0
- package/dist/cloud-lister/index.d.ts +4 -1
- package/dist/cloud-lister/index.js +2 -1
- package/dist/cloud-lister/kubernetes-components.d.ts +56 -0
- package/dist/cloud-lister/kubernetes-components.js +642 -0
- package/dist/cloud-lister/kubernetes.d.ts +18 -0
- package/dist/cloud-lister/kubernetes.js +26 -1
- package/dist/cloud-lister/mask.d.ts +5 -1
- package/dist/cloud-lister/mask.js +14 -5
- package/dist/components/cli-support.d.ts +1 -1
- package/dist/components/cli-support.js +1 -1
- package/dist/config-environments.d.ts +8 -1
- package/dist/config-environments.js +2 -0
- package/dist/config-import.d.ts +1 -1
- package/dist/config-import.js +6 -2
- package/dist/config-sandbox.d.ts +1 -1
- package/dist/config-sandbox.js +3 -3
- package/dist/config.d.ts +369 -10
- package/dist/config.js +127 -7
- package/dist/deep-observation.js +9 -3
- package/dist/floor-table.data.js +21 -1
- package/dist/forge-remote.d.ts +13 -0
- package/dist/forge-remote.js +15 -0
- package/dist/lexicon.d.ts +45 -4
- package/dist/lifecycle/__fixtures__/package-files.d.ts +32 -0
- package/dist/lifecycle/__fixtures__/package-files.js +72 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.d.ts +62 -0
- package/dist/lifecycle/__fixtures__/publish-fakes.js +275 -3
- package/dist/lifecycle/publish-attachments.d.ts +2 -1
- package/dist/lifecycle/publish-attachments.js +19 -2
- package/dist/lifecycle/publish-cargo.d.ts +99 -0
- package/dist/lifecycle/publish-cargo.js +412 -0
- package/dist/lifecycle/publish-credentials.d.ts +1 -1
- package/dist/lifecycle/publish-credentials.js +13 -0
- package/dist/lifecycle/publish-declaration.d.ts +322 -4
- package/dist/lifecycle/publish-declaration.js +340 -9
- package/dist/lifecycle/publish-forge.d.ts +45 -2
- package/dist/lifecycle/publish-forge.js +434 -34
- package/dist/lifecycle/publish-git-ssh.d.ts +15 -0
- package/dist/lifecycle/publish-git-ssh.js +30 -4
- package/dist/lifecycle/publish-github.d.ts +40 -2
- package/dist/lifecycle/publish-github.js +100 -3
- package/dist/lifecycle/publish-helm.d.ts +83 -0
- package/dist/lifecycle/publish-helm.js +452 -0
- package/dist/lifecycle/publish-homebrew.d.ts +7 -9
- package/dist/lifecycle/publish-homebrew.js +34 -197
- package/dist/lifecycle/publish-index.d.ts +141 -0
- package/dist/lifecycle/publish-index.js +719 -0
- package/dist/lifecycle/publish-marketplace.js +77 -0
- package/dist/lifecycle/publish-maven.d.ts +79 -0
- package/dist/lifecycle/publish-maven.js +364 -0
- package/dist/lifecycle/publish-mcp-registry.d.ts +66 -0
- package/dist/lifecycle/publish-mcp-registry.js +305 -0
- package/dist/lifecycle/publish-npm.d.ts +27 -1
- package/dist/lifecycle/publish-npm.js +216 -3
- package/dist/lifecycle/publish-nuget.d.ts +93 -0
- package/dist/lifecycle/publish-nuget.js +377 -0
- package/dist/lifecycle/publish-oci.d.ts +91 -2
- package/dist/lifecycle/publish-oci.js +247 -8
- package/dist/lifecycle/publish-package-files.d.ts +16 -0
- package/dist/lifecycle/publish-package-files.js +39 -0
- package/dist/lifecycle/publish-pypi.d.ts +138 -0
- package/dist/lifecycle/publish-pypi.js +657 -0
- package/dist/lifecycle/publish-record.d.ts +6 -3
- package/dist/lifecycle/publish-record.js +6 -3
- package/dist/lifecycle/publish-rubygems.d.ts +84 -0
- package/dist/lifecycle/publish-rubygems.js +366 -0
- package/dist/lifecycle/publish-signing.d.ts +147 -0
- package/dist/lifecycle/publish-signing.js +257 -0
- package/dist/lifecycle/publish-targets.d.ts +37 -1
- package/dist/lifecycle/publish-targets.js +102 -0
- package/dist/lifecycle/publish-tauri.js +43 -0
- package/dist/lifecycle/publish-train-names.d.ts +57 -0
- package/dist/lifecycle/publish-train-names.js +123 -0
- package/dist/lifecycle/publish-verify.d.ts +121 -0
- package/dist/lifecycle/publish-verify.js +130 -0
- package/dist/lifecycle/query.js +8 -0
- package/dist/lifecycle/release-artifacts.d.ts +290 -0
- package/dist/lifecycle/release-artifacts.js +808 -0
- package/dist/lifecycle/release-changelog.d.ts +13 -1
- package/dist/lifecycle/release-changelog.js +35 -2
- package/dist/lifecycle/release-cut.d.ts +64 -4
- package/dist/lifecycle/release-cut.js +147 -34
- package/dist/lifecycle/release-doctor.d.ts +113 -0
- package/dist/lifecycle/release-doctor.js +1198 -0
- package/dist/lifecycle/release-green.d.ts +86 -0
- package/dist/lifecycle/release-green.js +286 -0
- package/dist/lifecycle/release-init-registries.d.ts +48 -0
- package/dist/lifecycle/release-init-registries.js +97 -0
- package/dist/lifecycle/release-init.d.ts +275 -0
- package/dist/lifecycle/release-init.js +984 -0
- package/dist/lifecycle/release-intents.d.ts +73 -0
- package/dist/lifecycle/release-intents.js +128 -0
- package/dist/lifecycle/release-next.d.ts +111 -0
- package/dist/lifecycle/release-next.js +251 -0
- package/dist/lifecycle/release-prerelease.d.ts +19 -0
- package/dist/lifecycle/release-prerelease.js +30 -0
- package/dist/lifecycle/release-publish.d.ts +256 -10
- package/dist/lifecycle/release-publish.js +247 -35
- package/dist/lifecycle/release-status-change.d.ts +226 -0
- package/dist/lifecycle/release-status-change.js +478 -0
- package/dist/lifecycle/release-status.d.ts +11 -0
- package/dist/lifecycle/release-status.js +1 -1
- package/dist/lifecycle/release-store.d.ts +73 -2
- package/dist/lifecycle/release-store.js +32 -1
- package/dist/lifecycle/release-tag.d.ts +142 -0
- package/dist/lifecycle/release-tag.js +322 -0
- package/dist/lifecycle/release-verify.d.ts +73 -1
- package/dist/lifecycle/release-verify.js +117 -2
- package/dist/lifecycle/release-version-formats.d.ts +73 -0
- package/dist/lifecycle/release-version-formats.js +570 -0
- package/dist/lifecycle/release-version.d.ts +58 -10
- package/dist/lifecycle/release-version.js +164 -36
- package/dist/lifecycle/release-workstation.d.ts +3 -2
- package/dist/lifecycle/release-workstation.js +3 -2
- package/dist/op/generate-pipeline.js +1 -1
- package/dist/op/local-executor.d.ts +1 -1
- package/dist/op/local-executor.js +2 -2
- package/dist/op/op-waves-evidence.js +9 -2
- package/dist/pr-forge-base.js +4 -2
- package/dist/pr-forge.d.ts +20 -2
- package/dist/pr-forge.js +46 -10
- package/dist/release-floors.d.ts +8 -1
- package/dist/release-floors.js +9 -2
- package/dist/sensitive-key.d.ts +12 -0
- package/dist/sensitive-key.js +52 -0
- package/dist/tool-pins.d.ts +40 -0
- package/dist/tool-pins.js +66 -0
- package/dist/ts-loader.d.ts +8 -0
- package/dist/ts-loader.js +19 -0
- package/dist/wave-runtime.mjs +345 -342
- package/dist/workspace/ci-forge.d.ts +17 -0
- package/dist/workspace/ci-forge.js +17 -0
- package/dist/workspace/ci-init.js +1 -1
- package/dist/workspace/composites.schema.json +1 -0
- package/dist/workspace/declaration.d.ts +8 -0
- package/dist/workspace/declaration.js +12 -0
- package/dist/workspace/declaration.schema.json +8 -0
- package/dist/workspace/environments.d.ts +2 -0
- package/dist/workspace/environments.js +1 -1
- package/dist/workspace/identity-gate-rule.d.ts +61 -5
- package/dist/workspace/identity-gate-rule.js +81 -12
- package/dist/workspace/lexicon-outputs.d.ts +1 -1
- package/dist/workspace/lexicon-outputs.js +1 -1
- package/dist/workspace/member-pipeline.d.ts +2 -1
- package/dist/workspace/member-pipeline.js +5 -2
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.js +3 -1
- package/dist/workspace/release-changed.d.ts +75 -4
- package/dist/workspace/release-changed.js +205 -34
- package/dist/workspace/release-changed.schema.json +20 -2
- package/dist/workspace/release-steps/artifacts.d.ts +7 -0
- package/dist/workspace/release-steps/artifacts.js +45 -0
- package/dist/workspace/release-steps/builds.d.ts +12 -0
- package/dist/workspace/release-steps/builds.js +38 -0
- package/dist/workspace/release-steps/doctor.d.ts +8 -0
- package/dist/workspace/release-steps/doctor.js +14 -0
- package/dist/workspace/release-steps/goreleaser.d.ts +16 -0
- package/dist/workspace/release-steps/goreleaser.js +36 -0
- package/dist/workspace/release-steps/green.d.ts +3 -0
- package/dist/workspace/release-steps/green.js +6 -0
- package/dist/workspace/release-steps/images.d.ts +22 -0
- package/dist/workspace/release-steps/images.js +59 -0
- package/dist/workspace/release-steps/index.d.ts +9 -0
- package/dist/workspace/release-steps/index.js +50 -0
- package/dist/workspace/release-steps/nfpm.d.ts +13 -0
- package/dist/workspace/release-steps/nfpm.js +29 -0
- package/dist/workspace/release-steps/nuget.d.ts +14 -0
- package/dist/workspace/release-steps/nuget.js +16 -0
- package/dist/workspace/release-steps/pypi.d.ts +15 -0
- package/dist/workspace/release-steps/pypi.js +21 -0
- package/dist/workspace/release-steps/qemu.d.ts +21 -0
- package/dist/workspace/release-steps/qemu.js +35 -0
- package/dist/workspace/release-steps/signing.d.ts +18 -0
- package/dist/workspace/release-steps/signing.js +30 -0
- package/dist/workspace/release-steps/stamp.d.ts +3 -0
- package/dist/workspace/release-steps/stamp.js +4 -0
- package/dist/workspace/release-steps/targets.d.ts +31 -0
- package/dist/workspace/release-steps/targets.js +40 -0
- package/dist/workspace/release-steps/types.d.ts +104 -0
- package/dist/workspace/release-steps/types.js +2 -0
- package/dist/workspace/release-steps/verify.d.ts +3 -0
- package/dist/workspace/release-steps/verify.js +4 -0
- package/dist/workspace/release-toolchains.d.ts +59 -0
- package/dist/workspace/release-toolchains.js +133 -0
- package/dist/workspace/release-train-workflow.d.ts +36 -0
- package/dist/workspace/release-train-workflow.js +121 -0
- package/dist/workspace/release-train.d.ts +3 -1
- package/dist/workspace/release-train.js +20 -3
- package/dist/workspace/release-workflow.d.ts +183 -59
- package/dist/workspace/release-workflow.js +570 -201
- package/dist/workspace/releases.schema.json +70 -1
- package/dist/workspace/search-contract.d.ts +1 -1
- package/dist/workspace/security.js +9 -2
- package/dist/workspace/train-cut.d.ts +182 -0
- package/dist/workspace/train-cut.js +504 -0
- package/dist/workspace/train-prepare.d.ts +64 -0
- package/dist/workspace/train-prepare.js +313 -0
- package/dist/workspace/train-publish.d.ts +177 -0
- package/dist/workspace/train-publish.js +574 -0
- package/dist/workspace/train-range-labels.d.ts +33 -0
- package/dist/workspace/train-range-labels.js +109 -0
- package/dist/workspace/train-shell.d.ts +5 -0
- package/dist/workspace/train-shell.js +17 -0
- package/dist/workspace/trust/check-evidence-report.d.ts +3 -7
- package/dist/workspace/trust/check-evidence-report.js +3 -7
- package/dist/workspace/trust/seal.d.ts +13 -3
- package/dist/workspace/trust/seal.js +14 -4
- package/dist/workspace/work-cli.d.ts +3 -2
- package/dist/workspace/work-cli.js +3 -2
- package/dist/workspace/workspace-ledger.d.ts +14 -1
- package/dist/workspace/workspace-ledger.js +33 -7
- 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
|
|
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
|
-
|
|
104
|
-
export
|
|
105
|
-
|
|
106
|
-
export
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
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
|
-
*
|
|
115
|
-
* (
|
|
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
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
export
|
|
133
|
-
/** The
|
|
134
|
-
|
|
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
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* `
|
|
140
|
-
*
|
|
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
|
|
147
|
-
/**
|
|
148
|
-
export declare function
|
|
149
|
-
/**
|
|
150
|
-
export declare
|
|
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
|
-
*
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
*
|
|
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
|
|
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
|
/**
|