@mannyc1/ts-release 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +93 -0
- package/README.md +282 -49
- package/SPEC.md +46 -9
- 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/evidence.d.ts +4 -0
- package/dist/domain/evidence.d.ts.map +1 -1
- package/dist/domain/evidence.js +4 -0
- package/dist/domain/evidence.js.map +1 -1
- package/dist/domain/operation.d.ts +1 -0
- package/dist/domain/operation.d.ts.map +1 -1
- package/dist/domain/operation.js +147 -1
- package/dist/domain/operation.js.map +1 -1
- package/dist/domain/release.d.ts +1 -0
- package/dist/domain/release.d.ts.map +1 -1
- package/dist/domain/release.js +1 -0
- package/dist/domain/release.js.map +1 -1
- package/dist/domain/remote-state.d.ts +90 -0
- package/dist/domain/remote-state.d.ts.map +1 -0
- package/dist/domain/remote-state.js +85 -0
- package/dist/domain/remote-state.js.map +1 -0
- package/dist/domain/status.d.ts +43 -0
- package/dist/domain/status.d.ts.map +1 -0
- package/dist/domain/status.js +50 -0
- package/dist/domain/status.js.map +1 -0
- package/dist/domain/target.d.ts +32 -2
- package/dist/domain/target.d.ts.map +1 -1
- package/dist/domain/target.js +35 -2
- package/dist/domain/target.js.map +1 -1
- package/dist/host/host.d.ts +7 -23
- package/dist/host/host.d.ts.map +1 -1
- package/dist/host/host.js +3 -22
- package/dist/host/host.js.map +1 -1
- package/dist/host/http-live.d.ts +1 -2
- package/dist/host/http-live.d.ts.map +1 -1
- package/dist/host/http-live.js +18 -9
- package/dist/host/http-live.js.map +1 -1
- package/dist/host/http.d.ts +3 -1
- package/dist/host/http.d.ts.map +1 -1
- package/dist/host/http.js +3 -1
- package/dist/host/http.js.map +1 -1
- package/dist/host/platform.d.ts +10 -0
- package/dist/host/platform.d.ts.map +1 -0
- package/dist/host/platform.js +121 -0
- package/dist/host/platform.js.map +1 -0
- package/dist/host/test.d.ts +7 -3
- package/dist/host/test.d.ts.map +1 -1
- package/dist/host/test.js +128 -25
- 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 +9 -0
- package/dist/planner/artifact-inventory.d.ts.map +1 -0
- package/dist/planner/artifact-inventory.js +85 -0
- package/dist/planner/artifact-inventory.js.map +1 -0
- package/dist/planner/create-release-plan.d.ts +1 -1
- package/dist/planner/create-release-plan.d.ts.map +1 -1
- package/dist/planner/errors.d.ts +37 -1
- package/dist/planner/errors.d.ts.map +1 -1
- package/dist/planner/errors.js +30 -0
- package/dist/planner/errors.js.map +1 -1
- package/dist/planner/evidence-recorder.d.ts +13 -8
- package/dist/planner/evidence-recorder.d.ts.map +1 -1
- package/dist/planner/evidence-recorder.js +116 -18
- package/dist/planner/evidence-recorder.js.map +1 -1
- package/dist/planner/executor.d.ts +31 -19
- package/dist/planner/executor.d.ts.map +1 -1
- package/dist/planner/executor.js +52 -7
- package/dist/planner/executor.js.map +1 -1
- package/dist/planner/normalize-release.d.ts +2 -2
- package/dist/planner/normalize-release.d.ts.map +1 -1
- package/dist/planner/normalize-release.js +50 -52
- package/dist/planner/normalize-release.js.map +1 -1
- package/dist/planner/reconcile.d.ts +17 -0
- package/dist/planner/reconcile.d.ts.map +1 -0
- package/dist/planner/reconcile.js +337 -0
- package/dist/planner/reconcile.js.map +1 -0
- package/dist/planner/release-eligibility.d.ts +34 -0
- package/dist/planner/release-eligibility.d.ts.map +1 -0
- package/dist/planner/release-eligibility.js +179 -0
- package/dist/planner/release-eligibility.js.map +1 -0
- 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 +179 -0
- package/dist/planner/render-plan.js.map +1 -1
- package/dist/planner/status.d.ts +40 -0
- package/dist/planner/status.d.ts.map +1 -0
- package/dist/planner/status.js +342 -0
- package/dist/planner/status.js.map +1 -0
- package/dist/targets/github.d.ts.map +1 -1
- package/dist/targets/github.js +28 -13
- package/dist/targets/github.js.map +1 -1
- package/dist/targets/npm.d.ts +2 -2
- package/dist/targets/npm.d.ts.map +1 -1
- package/dist/targets/npm.js +74 -14
- package/dist/targets/npm.js.map +1 -1
- package/dist/workflows/config.d.ts +153 -0
- package/dist/workflows/config.d.ts.map +1 -0
- package/dist/workflows/config.js +301 -0
- package/dist/workflows/config.js.map +1 -0
- package/dist/workflows/diagnostics.d.ts +62 -0
- package/dist/workflows/diagnostics.d.ts.map +1 -0
- package/dist/workflows/diagnostics.js +474 -0
- package/dist/workflows/diagnostics.js.map +1 -0
- package/dist/workflows/evidence.d.ts +21 -0
- package/dist/workflows/evidence.d.ts.map +1 -0
- package/dist/workflows/evidence.js +45 -0
- package/dist/workflows/evidence.js.map +1 -0
- 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 +71 -0
- package/dist/workflows/init.d.ts.map +1 -0
- package/dist/workflows/init.js +384 -0
- package/dist/workflows/init.js.map +1 -0
- package/dist/workflows/live.d.ts +9 -0
- package/dist/workflows/live.d.ts.map +1 -0
- package/dist/workflows/live.js +7 -0
- package/dist/workflows/live.js.map +1 -0
- 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 -9
- 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 +10 -1
- package/examples/non-strict-skips/release.config.json +1 -0
- package/examples/npm-first-publish/release.config.json +33 -0
- package/examples/npm-only/release.config.json +10 -1
- package/examples/pypi-registry/release.config.json +1 -0
- package/examples/scoop-bucket/release.config.json +1 -0
- package/package.json +56 -27
- package/templates/README.md +54 -0
- package/templates/github-actions/plan-and-approved-execute.yml +53 -0
- package/templates/github-actions/plan-only.yml +30 -0
- package/templates/github-actions/trusted-publishing.yml +59 -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 -125
- 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 -15
- package/dist/cli/main.js.map +0 -1
- package/dist/cli/programmatic.d.ts +0 -25
- package/dist/cli/programmatic.d.ts.map +0 -1
- package/dist/cli/programmatic.js +0 -53
- package/dist/cli/programmatic.js.map +0 -1
- package/dist/host/bun.d.ts +0 -9
- package/dist/host/bun.d.ts.map +0 -1
- package/dist/host/bun.js +0 -156
- package/dist/host/bun.js.map +0 -1
|
@@ -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",
|
|
@@ -36,8 +37,16 @@
|
|
|
36
37
|
"_tag": "NpmRegistryTarget",
|
|
37
38
|
"id": "npm",
|
|
38
39
|
"registry": "https://registry.npmjs.org",
|
|
40
|
+
"packageName": "release-example-multi-target",
|
|
39
41
|
"packagePath": ".",
|
|
40
|
-
"
|
|
42
|
+
"trustedPublishing": {
|
|
43
|
+
"provider": "github-actions",
|
|
44
|
+
"workflow": "release.yml",
|
|
45
|
+
"packageExists": true,
|
|
46
|
+
"verifyPackageExists": true
|
|
47
|
+
},
|
|
48
|
+
"access": "public",
|
|
49
|
+
"provenance": true,
|
|
41
50
|
"dryRunSupport": "native",
|
|
42
51
|
"mutability": "immutable",
|
|
43
52
|
"recovery": "publish-new-version"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://mannyc2.github.io/ts-release/schema/release-config.schema.json",
|
|
3
|
+
"identity": {
|
|
4
|
+
"name": "@scope/release-example-first",
|
|
5
|
+
"version": "0.1.0",
|
|
6
|
+
"commit": "example",
|
|
7
|
+
"tag": "v0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"artifacts": [
|
|
10
|
+
{
|
|
11
|
+
"id": "package",
|
|
12
|
+
"path": ".",
|
|
13
|
+
"format": "directory",
|
|
14
|
+
"consumers": ["npm"]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"targets": [
|
|
18
|
+
{
|
|
19
|
+
"_tag": "NpmRegistryTarget",
|
|
20
|
+
"id": "npm",
|
|
21
|
+
"registry": "https://registry.npmjs.org",
|
|
22
|
+
"packageName": "@scope/release-example-first",
|
|
23
|
+
"packagePath": ".",
|
|
24
|
+
"tokenEnv": "NPM_TOKEN",
|
|
25
|
+
"access": "public",
|
|
26
|
+
"dryRunSupport": "native",
|
|
27
|
+
"mutability": "immutable",
|
|
28
|
+
"recovery": "publish-new-version"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"strict": true,
|
|
32
|
+
"evidenceDirectory": ".release/evidence"
|
|
33
|
+
}
|
|
@@ -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",
|
|
@@ -18,8 +19,16 @@
|
|
|
18
19
|
"_tag": "NpmRegistryTarget",
|
|
19
20
|
"id": "npm",
|
|
20
21
|
"registry": "https://registry.npmjs.org",
|
|
22
|
+
"packageName": "release-example-npm-only",
|
|
21
23
|
"packagePath": ".",
|
|
22
|
-
"
|
|
24
|
+
"trustedPublishing": {
|
|
25
|
+
"provider": "github-actions",
|
|
26
|
+
"workflow": "release.yml",
|
|
27
|
+
"packageExists": true,
|
|
28
|
+
"verifyPackageExists": true
|
|
29
|
+
},
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true,
|
|
23
32
|
"dryRunSupport": "native",
|
|
24
33
|
"mutability": "immutable",
|
|
25
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.3",
|
|
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,32 +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
|
-
"./cli/programmatic": {
|
|
50
|
-
"types": "./dist/cli/programmatic.d.ts",
|
|
51
|
-
"default": "./dist/cli/programmatic.js"
|
|
52
|
-
},
|
|
53
38
|
"./config/errors": {
|
|
54
39
|
"types": "./dist/config/errors.d.ts",
|
|
55
40
|
"default": "./dist/config/errors.js"
|
|
@@ -78,6 +63,10 @@
|
|
|
78
63
|
"types": "./dist/domain/release.d.ts",
|
|
79
64
|
"default": "./dist/domain/release.js"
|
|
80
65
|
},
|
|
66
|
+
"./domain/status": {
|
|
67
|
+
"types": "./dist/domain/status.d.ts",
|
|
68
|
+
"default": "./dist/domain/status.js"
|
|
69
|
+
},
|
|
81
70
|
"./domain/target": {
|
|
82
71
|
"types": "./dist/domain/target.d.ts",
|
|
83
72
|
"default": "./dist/domain/target.js"
|
|
@@ -86,10 +75,6 @@
|
|
|
86
75
|
"types": "./dist/host/host.d.ts",
|
|
87
76
|
"default": "./dist/host/host.js"
|
|
88
77
|
},
|
|
89
|
-
"./host/bun": {
|
|
90
|
-
"types": "./dist/host/bun.d.ts",
|
|
91
|
-
"default": "./dist/host/bun.js"
|
|
92
|
-
},
|
|
93
78
|
"./host/http": {
|
|
94
79
|
"types": "./dist/host/http.d.ts",
|
|
95
80
|
"default": "./dist/host/http.js"
|
|
@@ -98,6 +83,10 @@
|
|
|
98
83
|
"types": "./dist/host/http-live.d.ts",
|
|
99
84
|
"default": "./dist/host/http-live.js"
|
|
100
85
|
},
|
|
86
|
+
"./host/platform": {
|
|
87
|
+
"types": "./dist/host/platform.d.ts",
|
|
88
|
+
"default": "./dist/host/platform.js"
|
|
89
|
+
},
|
|
101
90
|
"./host/test": {
|
|
102
91
|
"types": "./dist/host/test.d.ts",
|
|
103
92
|
"default": "./dist/host/test.js"
|
|
@@ -122,10 +111,18 @@
|
|
|
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"
|
|
128
121
|
},
|
|
122
|
+
"./planner/status": {
|
|
123
|
+
"types": "./dist/planner/status.d.ts",
|
|
124
|
+
"default": "./dist/planner/status.js"
|
|
125
|
+
},
|
|
129
126
|
"./targets/adapter": {
|
|
130
127
|
"types": "./dist/targets/adapter.d.ts",
|
|
131
128
|
"default": "./dist/targets/adapter.js"
|
|
@@ -157,11 +154,37 @@
|
|
|
157
154
|
"./targets/scoop": {
|
|
158
155
|
"types": "./dist/targets/scoop.d.ts",
|
|
159
156
|
"default": "./dist/targets/scoop.js"
|
|
157
|
+
},
|
|
158
|
+
"./workflows": {
|
|
159
|
+
"types": "./dist/workflows/index.d.ts",
|
|
160
|
+
"default": "./dist/workflows/index.js"
|
|
161
|
+
},
|
|
162
|
+
"./workflows/config": {
|
|
163
|
+
"types": "./dist/workflows/config.d.ts",
|
|
164
|
+
"default": "./dist/workflows/config.js"
|
|
165
|
+
},
|
|
166
|
+
"./workflows/evidence": {
|
|
167
|
+
"types": "./dist/workflows/evidence.d.ts",
|
|
168
|
+
"default": "./dist/workflows/evidence.js"
|
|
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
|
+
},
|
|
178
|
+
"./workflows/live": {
|
|
179
|
+
"types": "./dist/workflows/live.d.ts",
|
|
180
|
+
"default": "./dist/workflows/live.js"
|
|
160
181
|
}
|
|
161
182
|
},
|
|
162
183
|
"files": [
|
|
184
|
+
"ARCHITECTURE.md",
|
|
163
185
|
"dist",
|
|
164
186
|
"examples",
|
|
187
|
+
"templates",
|
|
165
188
|
"SPEC.md",
|
|
166
189
|
"README.md"
|
|
167
190
|
],
|
|
@@ -177,17 +200,23 @@
|
|
|
177
200
|
"check:tree-shaking": "bun run scripts/check-tree-shaking.ts",
|
|
178
201
|
"check:examples": "bun run scripts/check-examples.ts",
|
|
179
202
|
"check:readme": "bun run scripts/check-readme.ts",
|
|
180
|
-
"check:self-release-config": "bun run scripts/check-self-release-config.ts",
|
|
181
|
-
"check:
|
|
203
|
+
"check:self-release-config": "bun run apps/release-ts/scripts/check-self-release-config.ts",
|
|
204
|
+
"check:action-bundle": "bun run scripts/check-action-bundle.ts",
|
|
205
|
+
"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",
|
|
206
|
+
"check:app": "bun run --cwd apps/release-ts check && bun test test/cli-command.test.ts",
|
|
207
|
+
"check:action": "bun run --cwd apps/ts-release-action check && bun run check:action-bundle && bun test test/action-command.test.ts",
|
|
208
|
+
"check:portable": "bun run check:core && bun run check:app && bun run check:action",
|
|
182
209
|
"check:release": "bun run check:self-release-config && bun run check:portable",
|
|
183
|
-
"
|
|
210
|
+
"release:artifacts": "bun run apps/release-ts/scripts/build-release-artifacts.ts",
|
|
211
|
+
"cli": "bun run apps/release-ts/src/cli/main.ts"
|
|
184
212
|
},
|
|
185
213
|
"dependencies": {
|
|
186
|
-
"@effect/platform-bun": "4.0.0-beta.83",
|
|
187
214
|
"effect": "4.0.0-beta.83"
|
|
188
215
|
},
|
|
189
216
|
"devDependencies": {
|
|
217
|
+
"@effect/platform-bun": "4.0.0-beta.83",
|
|
190
218
|
"@types/bun": "^1.3.14",
|
|
219
|
+
"bun-types": "^1.3.14",
|
|
191
220
|
"typescript": "^6.0.3"
|
|
192
221
|
}
|
|
193
222
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
```
|
|
23
|
+
|
|
24
|
+
Available config templates:
|
|
25
|
+
|
|
26
|
+
- `npm-only`: existing npm package with GitHub Actions trusted publishing.
|
|
27
|
+
- `npm-github`: npm plus GitHub Releases.
|
|
28
|
+
- `multi-target-homebrew`: npm, GitHub Releases, and a Homebrew tap.
|
|
29
|
+
- `multi-target-scoop`: npm, GitHub Releases, and a Scoop bucket.
|
|
30
|
+
|
|
31
|
+
The npm templates enable provenance, require `packageExists: true`, and set
|
|
32
|
+
`verifyPackageExists: true` so planning includes a read-only `npm view` check
|
|
33
|
+
before trusted publishing.
|
|
34
|
+
|
|
35
|
+
GitHub Actions templates are action-first:
|
|
36
|
+
|
|
37
|
+
- `github-actions/plan-only.yml`
|
|
38
|
+
- `github-actions/plan-and-approved-execute.yml`
|
|
39
|
+
- `github-actions/trusted-publishing.yml`
|
|
40
|
+
|
|
41
|
+
They use `mannyc2/ts-release-action@v1`; the action source lives in this repo at
|
|
42
|
+
`apps/ts-release-action` until the first action release is cut or mirrored.
|
|
43
|
+
The action currently defaults to `runtime: bundled`.
|
|
44
|
+
|
|
45
|
+
The trusted-publishing templates do not use `NPM_TOKEN`; configure npm trusted
|
|
46
|
+
publishing and a protected GitHub environment named `release` before approving
|
|
47
|
+
the execute job.
|
|
48
|
+
|
|
49
|
+
After writing a workflow, run static diagnostics before executing a release:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
bun run cli doctor --config release.config.json --format text
|
|
53
|
+
bun run cli check-ci --config release.config.json --workflow .github/workflows/release.yml --format markdown
|
|
54
|
+
```
|
|
@@ -0,0 +1,53 @@
|
|
|
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: oven-sh/setup-bun@v2
|
|
15
|
+
- run: bun install --frozen-lockfile
|
|
16
|
+
- uses: mannyc2/ts-release-action@v1
|
|
17
|
+
with:
|
|
18
|
+
command: plan
|
|
19
|
+
config: release.config.json
|
|
20
|
+
format: markdown
|
|
21
|
+
write-step-summary: true
|
|
22
|
+
plan-path: release-plan.md
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
if: always()
|
|
25
|
+
with:
|
|
26
|
+
name: release-plan
|
|
27
|
+
path: |
|
|
28
|
+
release-plan.md
|
|
29
|
+
.release/evidence/
|
|
30
|
+
|
|
31
|
+
execute:
|
|
32
|
+
needs: plan
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment: release
|
|
35
|
+
permissions:
|
|
36
|
+
contents: write
|
|
37
|
+
steps:
|
|
38
|
+
- uses: actions/checkout@v4
|
|
39
|
+
- uses: oven-sh/setup-bun@v2
|
|
40
|
+
- run: bun install --frozen-lockfile
|
|
41
|
+
- run: bun run build
|
|
42
|
+
- uses: mannyc2/ts-release-action@v1
|
|
43
|
+
with:
|
|
44
|
+
command: run
|
|
45
|
+
config: release.config.json
|
|
46
|
+
execute: true
|
|
47
|
+
approve-irreversible: true
|
|
48
|
+
write-step-summary: true
|
|
49
|
+
- uses: actions/upload-artifact@v4
|
|
50
|
+
if: always()
|
|
51
|
+
with:
|
|
52
|
+
name: release-evidence
|
|
53
|
+
path: .release/evidence/
|
|
@@ -0,0 +1,30 @@
|
|
|
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: oven-sh/setup-bun@v2
|
|
16
|
+
- run: bun install --frozen-lockfile
|
|
17
|
+
- uses: mannyc2/ts-release-action@v1
|
|
18
|
+
with:
|
|
19
|
+
command: plan
|
|
20
|
+
config: release.config.json
|
|
21
|
+
format: markdown
|
|
22
|
+
write-step-summary: true
|
|
23
|
+
plan-path: release-plan.md
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
if: always()
|
|
26
|
+
with:
|
|
27
|
+
name: release-plan
|
|
28
|
+
path: |
|
|
29
|
+
release-plan.md
|
|
30
|
+
.release/evidence/
|
|
@@ -0,0 +1,59 @@
|
|
|
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: oven-sh/setup-bun@v2
|
|
15
|
+
- run: bun install --frozen-lockfile
|
|
16
|
+
- uses: mannyc2/ts-release-action@v1
|
|
17
|
+
with:
|
|
18
|
+
command: plan
|
|
19
|
+
config: release.config.json
|
|
20
|
+
format: markdown
|
|
21
|
+
write-step-summary: true
|
|
22
|
+
plan-path: release-plan.md
|
|
23
|
+
- uses: actions/upload-artifact@v4
|
|
24
|
+
if: always()
|
|
25
|
+
with:
|
|
26
|
+
name: release-plan
|
|
27
|
+
path: |
|
|
28
|
+
release-plan.md
|
|
29
|
+
.release/evidence/
|
|
30
|
+
|
|
31
|
+
execute:
|
|
32
|
+
needs: plan
|
|
33
|
+
runs-on: ubuntu-latest
|
|
34
|
+
environment: release
|
|
35
|
+
permissions:
|
|
36
|
+
contents: write
|
|
37
|
+
id-token: write
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
- uses: oven-sh/setup-bun@v2
|
|
41
|
+
- uses: actions/setup-node@v4
|
|
42
|
+
with:
|
|
43
|
+
node-version: 22.14.0
|
|
44
|
+
registry-url: https://registry.npmjs.org
|
|
45
|
+
- run: npm install -g npm@^11.5.1
|
|
46
|
+
- run: bun install --frozen-lockfile
|
|
47
|
+
- run: bun run build
|
|
48
|
+
- uses: mannyc2/ts-release-action@v1
|
|
49
|
+
with:
|
|
50
|
+
command: run
|
|
51
|
+
config: release.config.json
|
|
52
|
+
execute: true
|
|
53
|
+
approve-irreversible: true
|
|
54
|
+
write-step-summary: true
|
|
55
|
+
- uses: actions/upload-artifact@v4
|
|
56
|
+
if: always()
|
|
57
|
+
with:
|
|
58
|
+
name: release-evidence
|
|
59
|
+
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
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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.zip",
|
|
19
|
+
"format": "zip",
|
|
20
|
+
"consumers": ["github", "scoop"]
|
|
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": "ScoopBucketTarget",
|
|
55
|
+
"id": "scoop",
|
|
56
|
+
"repository": "owner/scoop-bucket",
|
|
57
|
+
"manifestName": "pkg",
|
|
58
|
+
"manifestPath": ".release/generated/pkg.json",
|
|
59
|
+
"artifactId": "archive",
|
|
60
|
+
"homepage": "https://github.com/owner/repo",
|
|
61
|
+
"description": "Example Scoop manifest for pkg",
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"url": "https://github.com/owner/repo/releases/download/v0.1.0/pkg-0.1.0.zip",
|
|
64
|
+
"bin": "pkg.exe",
|
|
65
|
+
"dryRunSupport": "simulated",
|
|
66
|
+
"mutability": "mutable-index",
|
|
67
|
+
"recovery": "manual"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"strict": true,
|
|
71
|
+
"evidenceDirectory": ".release/evidence/{version}"
|
|
72
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
"targets": [
|
|
18
|
+
{
|
|
19
|
+
"_tag": "NpmRegistryTarget",
|
|
20
|
+
"id": "npm",
|
|
21
|
+
"registry": "https://registry.npmjs.org",
|
|
22
|
+
"packageName": "@scope/pkg",
|
|
23
|
+
"packagePath": ".",
|
|
24
|
+
"trustedPublishing": {
|
|
25
|
+
"provider": "github-actions",
|
|
26
|
+
"workflow": "release.yml",
|
|
27
|
+
"packageExists": true,
|
|
28
|
+
"verifyPackageExists": true
|
|
29
|
+
},
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true,
|
|
32
|
+
"dryRunSupport": "native",
|
|
33
|
+
"mutability": "immutable",
|
|
34
|
+
"recovery": "publish-new-version"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"_tag": "GitHubReleaseTarget",
|
|
38
|
+
"id": "github",
|
|
39
|
+
"repository": "owner/repo",
|
|
40
|
+
"tokenEnv": "GH_TOKEN",
|
|
41
|
+
"draft": true,
|
|
42
|
+
"prerelease": false,
|
|
43
|
+
"dryRunSupport": "simulated",
|
|
44
|
+
"mutability": "mutable-release",
|
|
45
|
+
"recovery": "delete-and-recreate"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"strict": true,
|
|
49
|
+
"evidenceDirectory": ".release/evidence/{version}"
|
|
50
|
+
}
|