@mannyc1/ts-release 0.0.2 → 0.0.5
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/ARCHITECTURE.md +55 -15
- package/README.md +229 -75
- package/SPEC.md +53 -9
- package/dist/config/errors.d.ts +2 -1
- package/dist/config/errors.d.ts.map +1 -1
- package/dist/config/errors.js +4 -3
- package/dist/config/errors.js.map +1 -1
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +5 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +4 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +13 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/domain/artifact.d.ts +3 -3
- package/dist/domain/artifact.d.ts.map +1 -1
- package/dist/domain/artifact.js +1 -1
- package/dist/domain/artifact.js.map +1 -1
- package/dist/domain/evidence.d.ts +18 -14
- package/dist/domain/evidence.d.ts.map +1 -1
- package/dist/domain/evidence.js +8 -3
- package/dist/domain/evidence.js.map +1 -1
- package/dist/domain/operation.d.ts +15 -14
- package/dist/domain/operation.d.ts.map +1 -1
- package/dist/domain/operation.js +117 -1
- package/dist/domain/operation.js.map +1 -1
- package/dist/domain/release.d.ts +84 -9
- package/dist/domain/release.d.ts.map +1 -1
- package/dist/domain/release.js +76 -5
- package/dist/domain/release.js.map +1 -1
- package/dist/domain/remote-state.d.ts +21 -16
- package/dist/domain/remote-state.d.ts.map +1 -1
- package/dist/domain/remote-state.js +14 -8
- package/dist/domain/remote-state.js.map +1 -1
- package/dist/domain/status.d.ts +4 -4
- package/dist/domain/status.d.ts.map +1 -1
- package/dist/domain/status.js +3 -2
- package/dist/domain/status.js.map +1 -1
- package/dist/domain/target.d.ts +7 -7
- package/dist/domain/target.d.ts.map +1 -1
- package/dist/domain/target.js +1 -1
- package/dist/domain/target.js.map +1 -1
- package/dist/host/host.d.ts +1 -0
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.js +2 -1
- package/dist/host/host.js.map +1 -1
- package/dist/host/http-live.d.ts.map +1 -1
- package/dist/host/http-live.js +7 -3
- package/dist/host/http-live.js.map +1 -1
- package/dist/host/http.d.ts +4 -1
- package/dist/host/http.d.ts.map +1 -1
- package/dist/host/http.js +5 -2
- package/dist/host/http.js.map +1 -1
- package/dist/host/platform.d.ts.map +1 -1
- package/dist/host/platform.js +2 -2
- package/dist/host/platform.js.map +1 -1
- package/dist/host/test.d.ts +1 -0
- package/dist/host/test.d.ts.map +1 -1
- package/dist/host/test.js +67 -7
- package/dist/host/test.js.map +1 -1
- package/dist/internal/workspace-path.d.ts +16 -0
- package/dist/internal/workspace-path.d.ts.map +1 -0
- package/dist/internal/workspace-path.js +33 -0
- package/dist/internal/workspace-path.js.map +1 -0
- package/dist/planner/artifact-inventory.d.ts.map +1 -1
- package/dist/planner/artifact-inventory.js +28 -9
- package/dist/planner/artifact-inventory.js.map +1 -1
- package/dist/planner/create-release-plan.d.ts +1 -1
- package/dist/planner/errors.d.ts +12 -6
- package/dist/planner/errors.d.ts.map +1 -1
- package/dist/planner/errors.js +20 -12
- package/dist/planner/errors.js.map +1 -1
- package/dist/planner/evidence-recorder.d.ts.map +1 -1
- package/dist/planner/evidence-recorder.js +32 -10
- package/dist/planner/evidence-recorder.js.map +1 -1
- package/dist/planner/executor.d.ts +4 -4
- package/dist/planner/executor.d.ts.map +1 -1
- package/dist/planner/executor.js +36 -4
- package/dist/planner/executor.js.map +1 -1
- package/dist/planner/normalize-release.d.ts +11 -2
- package/dist/planner/normalize-release.d.ts.map +1 -1
- package/dist/planner/normalize-release.js +98 -19
- package/dist/planner/normalize-release.js.map +1 -1
- package/dist/planner/reconcile.d.ts +1 -1
- package/dist/planner/reconcile.d.ts.map +1 -1
- package/dist/planner/reconcile.js +75 -92
- package/dist/planner/reconcile.js.map +1 -1
- package/dist/planner/release-eligibility.d.ts +20 -14
- package/dist/planner/release-eligibility.d.ts.map +1 -1
- package/dist/planner/release-eligibility.js +431 -25
- package/dist/planner/release-eligibility.js.map +1 -1
- package/dist/planner/render-plan.d.ts +10 -0
- package/dist/planner/render-plan.d.ts.map +1 -1
- package/dist/planner/render-plan.js +159 -0
- package/dist/planner/render-plan.js.map +1 -1
- package/dist/planner/status.d.ts +1 -1
- package/dist/planner/status.d.ts.map +1 -1
- package/dist/planner/status.js +8 -2
- package/dist/planner/status.js.map +1 -1
- package/dist/targets/adapter-helpers.d.ts +20 -2
- package/dist/targets/adapter-helpers.d.ts.map +1 -1
- package/dist/targets/adapter-helpers.js +32 -1
- package/dist/targets/adapter-helpers.js.map +1 -1
- package/dist/targets/github-release.d.ts +25 -0
- package/dist/targets/github-release.d.ts.map +1 -0
- package/dist/targets/github-release.js +82 -0
- package/dist/targets/github-release.js.map +1 -0
- package/dist/targets/github.d.ts +2 -2
- package/dist/targets/github.d.ts.map +1 -1
- package/dist/targets/github.js +28 -66
- package/dist/targets/github.js.map +1 -1
- package/dist/targets/homebrew.d.ts +2 -2
- package/dist/targets/homebrew.d.ts.map +1 -1
- package/dist/targets/homebrew.js +15 -31
- package/dist/targets/homebrew.js.map +1 -1
- package/dist/targets/scoop.d.ts +2 -2
- package/dist/targets/scoop.d.ts.map +1 -1
- package/dist/targets/scoop.js +13 -28
- package/dist/targets/scoop.js.map +1 -1
- package/dist/workflows/config.d.ts +191 -18
- package/dist/workflows/config.d.ts.map +1 -1
- package/dist/workflows/config.js +339 -61
- package/dist/workflows/config.js.map +1 -1
- package/dist/workflows/diagnostics.d.ts +62 -0
- package/dist/workflows/diagnostics.d.ts.map +1 -0
- package/dist/workflows/diagnostics.js +536 -0
- package/dist/workflows/diagnostics.js.map +1 -0
- package/dist/workflows/evidence.d.ts +8 -3
- package/dist/workflows/evidence.d.ts.map +1 -1
- package/dist/workflows/evidence.js +9 -0
- package/dist/workflows/evidence.js.map +1 -1
- package/dist/workflows/index.d.ts +7 -0
- package/dist/workflows/index.d.ts.map +1 -0
- package/dist/workflows/index.js +6 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/init.d.ts +84 -0
- package/dist/workflows/init.d.ts.map +1 -0
- package/dist/workflows/init.js +451 -0
- package/dist/workflows/init.js.map +1 -0
- package/dist/workflows/live.d.ts +2 -0
- package/dist/workflows/live.d.ts.map +1 -1
- package/dist/workflows/live.js +2 -0
- package/dist/workflows/live.js.map +1 -1
- package/dist/workflows/options.d.ts +30 -0
- package/dist/workflows/options.d.ts.map +1 -0
- package/dist/workflows/options.js +16 -0
- package/dist/workflows/options.js.map +1 -0
- package/examples/README.md +16 -12
- package/examples/github-release/release.config.json +1 -0
- package/examples/homebrew-tap/release.config.json +1 -0
- package/examples/multi-target/release.config.json +5 -1
- package/examples/non-strict-skips/release.config.json +1 -0
- package/examples/npm-first-publish/release.config.json +1 -0
- package/examples/npm-only/release.config.json +5 -1
- package/examples/pypi-registry/release.config.json +1 -0
- package/examples/scoop-bucket/release.config.json +1 -0
- package/package.json +37 -26
- package/templates/README.md +59 -0
- package/templates/github-actions/plan-and-approved-execute.yml +58 -0
- package/templates/github-actions/plan-only.yml +33 -0
- package/templates/github-actions/trusted-publishing.yml +61 -0
- package/templates/multi-target-homebrew/release.config.json +70 -0
- package/templates/multi-target-scoop/release.config.json +72 -0
- package/templates/npm-github/release.config.json +50 -0
- package/templates/npm-only/release.config.json +39 -0
- package/dist/cli/command.d.ts +0 -4
- package/dist/cli/command.d.ts.map +0 -1
- package/dist/cli/command.js +0 -173
- package/dist/cli/command.js.map +0 -1
- package/dist/cli/main.d.ts +0 -3
- package/dist/cli/main.d.ts.map +0 -1
- package/dist/cli/main.js +0 -9
- package/dist/cli/main.js.map +0 -1
- package/dist/runtime/bun.d.ts +0 -9
- package/dist/runtime/bun.d.ts.map +0 -1
- package/dist/runtime/bun.js +0 -10
- package/dist/runtime/bun.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -2
- package/dist/version.js.map +0 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface ReleaseConfigFields {
|
|
2
|
+
readonly root?: string | undefined;
|
|
3
|
+
readonly configPath?: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
export interface ReleaseFormatField<Format extends string> {
|
|
6
|
+
readonly format?: Format | undefined;
|
|
7
|
+
}
|
|
8
|
+
export interface ReleaseExecutionFields extends ReleaseConfigFields {
|
|
9
|
+
readonly execute?: boolean | undefined;
|
|
10
|
+
readonly approveIrreversible?: boolean | undefined;
|
|
11
|
+
}
|
|
12
|
+
export declare const releaseConfigFields: (input: ReleaseConfigFields) => {
|
|
13
|
+
configPath?: string;
|
|
14
|
+
root?: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const releaseFormatField: <Format extends string>(input: ReleaseFormatField<Format>) => {
|
|
17
|
+
format?: Format;
|
|
18
|
+
};
|
|
19
|
+
export declare const releaseExecuteField: (input: {
|
|
20
|
+
readonly execute?: boolean | undefined;
|
|
21
|
+
}) => {
|
|
22
|
+
execute?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const releaseExecutionFields: (input: ReleaseExecutionFields) => {
|
|
25
|
+
approveIrreversible?: boolean;
|
|
26
|
+
execute?: boolean;
|
|
27
|
+
configPath?: string;
|
|
28
|
+
root?: string;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/workflows/options.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACzC;AAED,MAAM,WAAW,kBAAkB,CAAC,MAAM,SAAS,MAAM;IACvD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACrC;AAED,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACnD;AAED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,mBAAmB;;;CAI1B,CAAA;AAEF,eAAO,MAAM,kBAAkB,GAAI,MAAM,SAAS,MAAM,EACtD,OAAO,kBAAkB,CAAC,MAAM,CAAC;;CAGjC,CAAA;AAEF,eAAO,MAAM,mBAAmB,GAC9B,OAAO;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE;;CAGjD,CAAA;AAEF,eAAO,MAAM,sBAAsB,GACjC,OAAO,sBAAsB;;;;;CAK7B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const releaseConfigFields = (input) => ({
|
|
2
|
+
...(input.root === undefined ? {} : { root: input.root }),
|
|
3
|
+
...(input.configPath === undefined ? {} : { configPath: input.configPath })
|
|
4
|
+
});
|
|
5
|
+
export const releaseFormatField = (input) => ({
|
|
6
|
+
...(input.format === undefined ? {} : { format: input.format })
|
|
7
|
+
});
|
|
8
|
+
export const releaseExecuteField = (input) => ({
|
|
9
|
+
...(input.execute === undefined ? {} : { execute: input.execute })
|
|
10
|
+
});
|
|
11
|
+
export const releaseExecutionFields = (input) => ({
|
|
12
|
+
...releaseConfigFields(input),
|
|
13
|
+
...releaseExecuteField(input),
|
|
14
|
+
...(input.approveIrreversible === undefined ? {} : { approveIrreversible: input.approveIrreversible })
|
|
15
|
+
});
|
|
16
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/workflows/options.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAA0B,EAC1B,EAAE,CAAC,CAAC;IACJ,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IACzD,GAAG,CAAC,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;CAC5E,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,KAAiC,EACjC,EAAE,CAAC,CAAC;IACJ,GAAG,CAAC,KAAK,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CAChE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,KAAiD,EACjD,EAAE,CAAC,CAAC;IACJ,GAAG,CAAC,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;CACnE,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CACpC,KAA6B,EAC7B,EAAE,CAAC,CAAC;IACJ,GAAG,mBAAmB,CAAC,KAAK,CAAC;IAC7B,GAAG,mBAAmB,CAAC,KAAK,CAAC;IAC7B,GAAG,CAAC,KAAK,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,CAAC;CACvG,CAAC,CAAA"}
|
package/examples/README.md
CHANGED
|
@@ -4,15 +4,17 @@ Start with the coordinated release example:
|
|
|
4
4
|
|
|
5
5
|
```sh
|
|
6
6
|
cd examples/multi-target
|
|
7
|
-
bun ../../
|
|
7
|
+
bun ../../apps/release-ts/src/cli/main.ts plan --config release.config.json --format text
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
That plan shows one release split across
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
That plan shows one release split across GitHub Releases, npm, and a Homebrew
|
|
11
|
+
tap. Inspect the artifact inventory, target capabilities, `argv` lines,
|
|
12
|
+
approval gates, and generated catalog-file operations. `plan` is safe: publish
|
|
13
|
+
operations stay data until a caller passes explicit execution approval.
|
|
14
|
+
|
|
15
|
+
Templates live in `../templates/` and are copyable starting points for new
|
|
16
|
+
repositories. These examples are runnable fixtures for this repository's
|
|
17
|
+
checks.
|
|
16
18
|
|
|
17
19
|
Focused examples:
|
|
18
20
|
|
|
@@ -25,8 +27,10 @@ Focused examples:
|
|
|
25
27
|
- `scoop-bucket`: Scoop bucket manifest rendering with simulated validation.
|
|
26
28
|
- `non-strict-skips`: non-strict config that records skipped dry-run evidence.
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
Trusted-publishing npm examples use `provenance` and
|
|
31
|
+
`verifyPackageExists`. `npm-first-publish` demonstrates only the bootstrap shape
|
|
32
|
+
for a package that does not exist on npm yet, so it stays token-based and omits
|
|
33
|
+
`trustedPublishing`. Replace it with trusted publishing after the first version
|
|
34
|
+
exists. TestPyPI is still a real registry publish target, not a dry-run. The
|
|
35
|
+
examples only render plans; do not run publish operations without intentional
|
|
36
|
+
credentials and approval flags.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://mannyc2.github.io/ts-release/schema/release-config.schema.json",
|
|
2
3
|
"identity": {
|
|
3
4
|
"name": "release-example-multi-target",
|
|
4
5
|
"version": "0.1.0",
|
|
@@ -41,8 +42,11 @@
|
|
|
41
42
|
"trustedPublishing": {
|
|
42
43
|
"provider": "github-actions",
|
|
43
44
|
"workflow": "release.yml",
|
|
44
|
-
"packageExists": true
|
|
45
|
+
"packageExists": true,
|
|
46
|
+
"verifyPackageExists": true
|
|
45
47
|
},
|
|
48
|
+
"access": "public",
|
|
49
|
+
"provenance": true,
|
|
46
50
|
"dryRunSupport": "native",
|
|
47
51
|
"mutability": "immutable",
|
|
48
52
|
"recovery": "publish-new-version"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
+
"$schema": "https://mannyc2.github.io/ts-release/schema/release-config.schema.json",
|
|
2
3
|
"identity": {
|
|
3
4
|
"name": "release-example-npm-only",
|
|
4
5
|
"version": "0.1.0",
|
|
@@ -23,8 +24,11 @@
|
|
|
23
24
|
"trustedPublishing": {
|
|
24
25
|
"provider": "github-actions",
|
|
25
26
|
"workflow": "release.yml",
|
|
26
|
-
"packageExists": true
|
|
27
|
+
"packageExists": true,
|
|
28
|
+
"verifyPackageExists": true
|
|
27
29
|
},
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true,
|
|
28
32
|
"dryRunSupport": "native",
|
|
29
33
|
"mutability": "immutable",
|
|
30
34
|
"recovery": "publish-new-version"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mannyc1/ts-release",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"packageManager": "bun@1.3.14",
|
|
6
6
|
"description": "Plan-first release orchestration with explicit validation, evidence, and execution gates.",
|
|
@@ -24,28 +24,17 @@
|
|
|
24
24
|
"bun",
|
|
25
25
|
"cli"
|
|
26
26
|
],
|
|
27
|
+
"workspaces": [
|
|
28
|
+
"apps/*"
|
|
29
|
+
],
|
|
27
30
|
"engines": {
|
|
28
31
|
"bun": ">=1.3.14"
|
|
29
32
|
},
|
|
30
|
-
"bin": {
|
|
31
|
-
"release": "dist/cli/main.js"
|
|
32
|
-
},
|
|
33
|
-
"sideEffects": [
|
|
34
|
-
"./dist/cli/main.js"
|
|
35
|
-
],
|
|
36
33
|
"exports": {
|
|
37
34
|
".": {
|
|
38
35
|
"types": "./dist/index.d.ts",
|
|
39
36
|
"default": "./dist/index.js"
|
|
40
37
|
},
|
|
41
|
-
"./cli": {
|
|
42
|
-
"types": "./dist/cli/command.d.ts",
|
|
43
|
-
"default": "./dist/cli/command.js"
|
|
44
|
-
},
|
|
45
|
-
"./cli/command": {
|
|
46
|
-
"types": "./dist/cli/command.d.ts",
|
|
47
|
-
"default": "./dist/cli/command.js"
|
|
48
|
-
},
|
|
49
38
|
"./config/errors": {
|
|
50
39
|
"types": "./dist/config/errors.d.ts",
|
|
51
40
|
"default": "./dist/config/errors.js"
|
|
@@ -122,6 +111,10 @@
|
|
|
122
111
|
"types": "./dist/planner/normalize-release.d.ts",
|
|
123
112
|
"default": "./dist/planner/normalize-release.js"
|
|
124
113
|
},
|
|
114
|
+
"./planner/release-eligibility": {
|
|
115
|
+
"types": "./dist/planner/release-eligibility.d.ts",
|
|
116
|
+
"default": "./dist/planner/release-eligibility.js"
|
|
117
|
+
},
|
|
125
118
|
"./planner/render-plan": {
|
|
126
119
|
"types": "./dist/planner/render-plan.d.ts",
|
|
127
120
|
"default": "./dist/planner/render-plan.js"
|
|
@@ -130,10 +123,6 @@
|
|
|
130
123
|
"types": "./dist/planner/status.d.ts",
|
|
131
124
|
"default": "./dist/planner/status.js"
|
|
132
125
|
},
|
|
133
|
-
"./runtime/bun": {
|
|
134
|
-
"types": "./dist/runtime/bun.d.ts",
|
|
135
|
-
"default": "./dist/runtime/bun.js"
|
|
136
|
-
},
|
|
137
126
|
"./targets/adapter": {
|
|
138
127
|
"types": "./dist/targets/adapter.d.ts",
|
|
139
128
|
"default": "./dist/targets/adapter.js"
|
|
@@ -166,6 +155,10 @@
|
|
|
166
155
|
"types": "./dist/targets/scoop.d.ts",
|
|
167
156
|
"default": "./dist/targets/scoop.js"
|
|
168
157
|
},
|
|
158
|
+
"./workflows": {
|
|
159
|
+
"types": "./dist/workflows/index.d.ts",
|
|
160
|
+
"default": "./dist/workflows/index.js"
|
|
161
|
+
},
|
|
169
162
|
"./workflows/config": {
|
|
170
163
|
"types": "./dist/workflows/config.d.ts",
|
|
171
164
|
"default": "./dist/workflows/config.js"
|
|
@@ -174,6 +167,14 @@
|
|
|
174
167
|
"types": "./dist/workflows/evidence.d.ts",
|
|
175
168
|
"default": "./dist/workflows/evidence.js"
|
|
176
169
|
},
|
|
170
|
+
"./workflows/diagnostics": {
|
|
171
|
+
"types": "./dist/workflows/diagnostics.d.ts",
|
|
172
|
+
"default": "./dist/workflows/diagnostics.js"
|
|
173
|
+
},
|
|
174
|
+
"./workflows/init": {
|
|
175
|
+
"types": "./dist/workflows/init.d.ts",
|
|
176
|
+
"default": "./dist/workflows/init.js"
|
|
177
|
+
},
|
|
177
178
|
"./workflows/live": {
|
|
178
179
|
"types": "./dist/workflows/live.d.ts",
|
|
179
180
|
"default": "./dist/workflows/live.js"
|
|
@@ -183,6 +184,7 @@
|
|
|
183
184
|
"ARCHITECTURE.md",
|
|
184
185
|
"dist",
|
|
185
186
|
"examples",
|
|
187
|
+
"templates",
|
|
186
188
|
"SPEC.md",
|
|
187
189
|
"README.md"
|
|
188
190
|
],
|
|
@@ -198,18 +200,27 @@
|
|
|
198
200
|
"check:tree-shaking": "bun run scripts/check-tree-shaking.ts",
|
|
199
201
|
"check:examples": "bun run scripts/check-examples.ts",
|
|
200
202
|
"check:readme": "bun run scripts/check-readme.ts",
|
|
201
|
-
"check:self-release-config": "bun run scripts/check-self-release-config.ts",
|
|
202
|
-
"check:
|
|
203
|
-
"check:
|
|
204
|
-
"
|
|
205
|
-
"
|
|
203
|
+
"check:self-release-config": "bun run apps/release-ts/scripts/check-self-release-config.ts",
|
|
204
|
+
"check:self-release-ci": "bun run cli check-ci --config apps/release-ts/release.config.json --workflow .github/workflows/release.yml --format text",
|
|
205
|
+
"check:action-bundle": "bun run scripts/check-action-bundle.ts",
|
|
206
|
+
"check:core": "bun run check && bun test && bun audit && bun run check:effect-imports && bun run check:tree-shaking && bun run build && bun run check:examples && bun run check:readme && bun run check:package-exports",
|
|
207
|
+
"check:app": "bun run --cwd apps/release-ts check && bun test test/cli-command.test.ts",
|
|
208
|
+
"check:action": "bun run --cwd apps/ts-release-action check && bun run check:action-bundle && bun test test/action-command.test.ts",
|
|
209
|
+
"check:portable": "bun run check:core && bun run check:app && bun run check:action",
|
|
210
|
+
"check:release": "bun run check:self-release-config && bun run check:self-release-ci && bun run check:portable",
|
|
211
|
+
"release:artifacts": "bun run apps/release-ts/scripts/build-release-artifacts.ts",
|
|
212
|
+
"cli": "bun run apps/release-ts/src/cli/main.ts"
|
|
206
213
|
},
|
|
207
214
|
"dependencies": {
|
|
208
|
-
"
|
|
209
|
-
"
|
|
215
|
+
"effect": "4.0.0-beta.83",
|
|
216
|
+
"semver": "^7.8.5"
|
|
210
217
|
},
|
|
211
218
|
"devDependencies": {
|
|
219
|
+
"@effect/bun-test": "file:vendor/effect-bun-test",
|
|
220
|
+
"@effect/platform-bun": "4.0.0-beta.83",
|
|
212
221
|
"@types/bun": "^1.3.14",
|
|
222
|
+
"@types/semver": "^7.7.1",
|
|
223
|
+
"bun-types": "^1.3.14",
|
|
213
224
|
"typescript": "^6.0.3"
|
|
214
225
|
}
|
|
215
226
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Release Templates
|
|
2
|
+
|
|
3
|
+
Templates are copyable starting points for new repositories. They use
|
|
4
|
+
placeholder names and may reference artifacts that you still need to build.
|
|
5
|
+
The checked-in JSON templates are the same policy shape produced by `release
|
|
6
|
+
init`.
|
|
7
|
+
|
|
8
|
+
After copying a template, preview the release plan first:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
bun run cli plan --config release.config.json --format text
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Runnable fixtures live in `examples/`; templates are for authoring your own
|
|
15
|
+
`release.config.json`.
|
|
16
|
+
|
|
17
|
+
The CLI can preview or write these configs:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
bun run cli init --template npm-github --package @scope/pkg --repo owner/repo
|
|
21
|
+
bun run cli init --template npm-github --package @scope/pkg --repo owner/repo --github-actions --write
|
|
22
|
+
bun run cli init --template npm-github --package @scope/pkg --repo owner/repo --github-actions --package-manager npm --write
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Available config templates:
|
|
26
|
+
|
|
27
|
+
- `npm-only`: existing npm package with GitHub Actions trusted publishing.
|
|
28
|
+
- `npm-github`: npm plus GitHub Releases.
|
|
29
|
+
- `multi-target-homebrew`: npm, GitHub Releases, and a Homebrew tap.
|
|
30
|
+
- `multi-target-scoop`: npm, GitHub Releases, and a Scoop bucket.
|
|
31
|
+
|
|
32
|
+
The npm templates enable provenance, require `packageExists: true`, and set
|
|
33
|
+
`verifyPackageExists: true` so planning includes a read-only `npm view` check
|
|
34
|
+
before trusted publishing.
|
|
35
|
+
|
|
36
|
+
GitHub Actions templates are action-first:
|
|
37
|
+
|
|
38
|
+
- `github-actions/plan-only.yml`
|
|
39
|
+
- `github-actions/plan-and-approved-execute.yml`
|
|
40
|
+
- `github-actions/trusted-publishing.yml`
|
|
41
|
+
|
|
42
|
+
They use `mannyc2/ts-release-action@v1`; the action source lives in this repo at
|
|
43
|
+
`apps/ts-release-action` until the first action release is cut or mirrored.
|
|
44
|
+
The action currently defaults to `runtime: bundled`.
|
|
45
|
+
|
|
46
|
+
Generated workflows support Bun, npm, pnpm, and yarn setup presets. Static
|
|
47
|
+
checked-in workflow templates use npm setup by default; setup, install, and
|
|
48
|
+
build commands are workflow scaffolding rather than release config policy.
|
|
49
|
+
|
|
50
|
+
The trusted-publishing templates do not use `NPM_TOKEN`; configure npm trusted
|
|
51
|
+
publishing and a protected GitHub environment named `release` before approving
|
|
52
|
+
the execute job.
|
|
53
|
+
|
|
54
|
+
After writing a workflow, run static diagnostics before executing a release:
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
bun run cli doctor --config release.config.json --format text
|
|
58
|
+
bun run cli check-ci --config release.config.json --workflow .github/workflows/release.yml --format markdown
|
|
59
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
plan:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 22.14.0
|
|
17
|
+
- run: npm ci
|
|
18
|
+
- run: npm run build --if-present
|
|
19
|
+
- uses: mannyc2/ts-release-action@v1
|
|
20
|
+
with:
|
|
21
|
+
command: plan
|
|
22
|
+
config: release.config.json
|
|
23
|
+
format: markdown
|
|
24
|
+
write-step-summary: true
|
|
25
|
+
plan-path: release-plan.md
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
if: always()
|
|
28
|
+
with:
|
|
29
|
+
name: release-plan
|
|
30
|
+
path: |
|
|
31
|
+
release-plan.md
|
|
32
|
+
.release/evidence/
|
|
33
|
+
|
|
34
|
+
execute:
|
|
35
|
+
needs: plan
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment: release
|
|
38
|
+
permissions:
|
|
39
|
+
contents: write
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@v4
|
|
42
|
+
- uses: actions/setup-node@v4
|
|
43
|
+
with:
|
|
44
|
+
node-version: 22.14.0
|
|
45
|
+
- run: npm ci
|
|
46
|
+
- run: npm run build --if-present
|
|
47
|
+
- uses: mannyc2/ts-release-action@v1
|
|
48
|
+
with:
|
|
49
|
+
command: run
|
|
50
|
+
config: release.config.json
|
|
51
|
+
execute: true
|
|
52
|
+
approve-irreversible: true
|
|
53
|
+
write-step-summary: true
|
|
54
|
+
- uses: actions/upload-artifact@v4
|
|
55
|
+
if: always()
|
|
56
|
+
with:
|
|
57
|
+
name: release-evidence
|
|
58
|
+
path: .release/evidence/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Release Plan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
plan:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 22.14.0
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm run build --if-present
|
|
20
|
+
- uses: mannyc2/ts-release-action@v1
|
|
21
|
+
with:
|
|
22
|
+
command: plan
|
|
23
|
+
config: release.config.json
|
|
24
|
+
format: markdown
|
|
25
|
+
write-step-summary: true
|
|
26
|
+
plan-path: release-plan.md
|
|
27
|
+
- uses: actions/upload-artifact@v4
|
|
28
|
+
if: always()
|
|
29
|
+
with:
|
|
30
|
+
name: release-plan
|
|
31
|
+
path: |
|
|
32
|
+
release-plan.md
|
|
33
|
+
.release/evidence/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
plan:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: 22.14.0
|
|
17
|
+
- run: npm ci
|
|
18
|
+
- run: npm run build --if-present
|
|
19
|
+
- uses: mannyc2/ts-release-action@v1
|
|
20
|
+
with:
|
|
21
|
+
command: plan
|
|
22
|
+
config: release.config.json
|
|
23
|
+
format: markdown
|
|
24
|
+
write-step-summary: true
|
|
25
|
+
plan-path: release-plan.md
|
|
26
|
+
- uses: actions/upload-artifact@v4
|
|
27
|
+
if: always()
|
|
28
|
+
with:
|
|
29
|
+
name: release-plan
|
|
30
|
+
path: |
|
|
31
|
+
release-plan.md
|
|
32
|
+
.release/evidence/
|
|
33
|
+
|
|
34
|
+
execute:
|
|
35
|
+
needs: plan
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
environment: release
|
|
38
|
+
permissions:
|
|
39
|
+
contents: write
|
|
40
|
+
id-token: write
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-node@v4
|
|
44
|
+
with:
|
|
45
|
+
node-version: 22.14.0
|
|
46
|
+
registry-url: https://registry.npmjs.org
|
|
47
|
+
- run: npm install -g npm@^11.5.1
|
|
48
|
+
- run: npm ci
|
|
49
|
+
- run: npm run build --if-present
|
|
50
|
+
- uses: mannyc2/ts-release-action@v1
|
|
51
|
+
with:
|
|
52
|
+
command: run
|
|
53
|
+
config: release.config.json
|
|
54
|
+
execute: true
|
|
55
|
+
approve-irreversible: true
|
|
56
|
+
write-step-summary: true
|
|
57
|
+
- uses: actions/upload-artifact@v4
|
|
58
|
+
if: always()
|
|
59
|
+
with:
|
|
60
|
+
name: release-evidence
|
|
61
|
+
path: .release/evidence/
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://mannyc2.github.io/ts-release/schema/release-config.schema.json",
|
|
3
|
+
"identity": {
|
|
4
|
+
"name": "@scope/pkg",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"commit": "abc123",
|
|
7
|
+
"tag": "v0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"artifacts": [
|
|
10
|
+
{
|
|
11
|
+
"id": "package",
|
|
12
|
+
"path": ".",
|
|
13
|
+
"format": "directory",
|
|
14
|
+
"consumers": ["npm"]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "archive",
|
|
18
|
+
"path": "artifacts/pkg-0.1.0.tgz",
|
|
19
|
+
"format": "tarball",
|
|
20
|
+
"consumers": ["github", "homebrew"]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"targets": [
|
|
24
|
+
{
|
|
25
|
+
"_tag": "NpmRegistryTarget",
|
|
26
|
+
"id": "npm",
|
|
27
|
+
"registry": "https://registry.npmjs.org",
|
|
28
|
+
"packageName": "@scope/pkg",
|
|
29
|
+
"packagePath": ".",
|
|
30
|
+
"trustedPublishing": {
|
|
31
|
+
"provider": "github-actions",
|
|
32
|
+
"workflow": "release.yml",
|
|
33
|
+
"packageExists": true,
|
|
34
|
+
"verifyPackageExists": true
|
|
35
|
+
},
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true,
|
|
38
|
+
"dryRunSupport": "native",
|
|
39
|
+
"mutability": "immutable",
|
|
40
|
+
"recovery": "publish-new-version"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"_tag": "GitHubReleaseTarget",
|
|
44
|
+
"id": "github",
|
|
45
|
+
"repository": "owner/repo",
|
|
46
|
+
"tokenEnv": "GH_TOKEN",
|
|
47
|
+
"draft": true,
|
|
48
|
+
"prerelease": false,
|
|
49
|
+
"dryRunSupport": "simulated",
|
|
50
|
+
"mutability": "mutable-release",
|
|
51
|
+
"recovery": "delete-and-recreate"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"_tag": "HomebrewTapTarget",
|
|
55
|
+
"id": "homebrew",
|
|
56
|
+
"repository": "owner/homebrew-tap",
|
|
57
|
+
"formulaName": "pkg",
|
|
58
|
+
"formulaPath": ".release/generated/pkg.rb",
|
|
59
|
+
"artifactId": "archive",
|
|
60
|
+
"homepage": "https://github.com/owner/repo",
|
|
61
|
+
"url": "https://github.com/owner/repo/releases/download/v0.1.0/pkg-0.1.0.tgz",
|
|
62
|
+
"installPath": "bin/pkg",
|
|
63
|
+
"dryRunSupport": "simulated",
|
|
64
|
+
"mutability": "mutable-index",
|
|
65
|
+
"recovery": "manual"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"strict": true,
|
|
69
|
+
"evidenceDirectory": ".release/evidence/{version}"
|
|
70
|
+
}
|