putitoutthere 0.1.44 → 0.1.45
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/CHANGELOG.md +10 -1
- package/MIGRATIONS.md +82 -5
- package/README.md +16 -42
- package/action.yml +1 -1
- package/dist/cascade.d.ts +1 -1
- package/dist/cascade.js +2 -2
- package/dist/cli.d.ts +5 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -383
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +6 -55
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +1 -32
- package/dist/config.js.map +1 -1
- package/dist/publish.d.ts +0 -10
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +6 -52
- package/dist/publish.js.map +1 -1
- package/dist/types.d.ts +1 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/auth.d.ts +0 -68
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -285
- package/dist/auth.js.map +0 -1
- package/dist/doctor.d.ts +0 -115
- package/dist/doctor.d.ts.map +0 -1
- package/dist/doctor.js +0 -292
- package/dist/doctor.js.map +0 -1
- package/dist/keyring.d.ts +0 -35
- package/dist/keyring.d.ts.map +0 -1
- package/dist/keyring.js +0 -88
- package/dist/keyring.js.map +0 -1
- package/dist/oidc-policy.d.ts +0 -145
- package/dist/oidc-policy.d.ts.map +0 -1
- package/dist/oidc-policy.js +0 -388
- package/dist/oidc-policy.js.map +0 -1
- package/dist/preflight-run.d.ts +0 -47
- package/dist/preflight-run.d.ts.map +0 -1
- package/dist/preflight-run.js +0 -197
- package/dist/preflight-run.js.map +0 -1
- package/dist/registries/crates-trust.d.ts +0 -69
- package/dist/registries/crates-trust.d.ts.map +0 -1
- package/dist/registries/crates-trust.js +0 -95
- package/dist/registries/crates-trust.js.map +0 -1
- package/dist/release.d.ts +0 -36
- package/dist/release.d.ts.map +0 -1
- package/dist/release.js +0 -102
- package/dist/release.js.map +0 -1
- package/dist/token-scope.d.ts +0 -65
- package/dist/token-scope.d.ts.map +0 -1
- package/dist/token-scope.js +0 -163
- package/dist/token-scope.js.map +0 -1
- package/dist/token.d.ts +0 -211
- package/dist/token.d.ts.map +0 -1
- package/dist/token.js +0 -719
- package/dist/token.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,7 +12,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
12
12
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
|
-
- **Reusable workflow `.github/workflows/release.yml` (`workflow_call`).** The single user-facing surface. Consumer integration is one `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@
|
|
15
|
+
- **Reusable workflow `.github/workflows/release.yml` (`workflow_call`).** The single user-facing surface. Consumer integration is one `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0` line in their own `release.yml`; pinned action versions, plan/build/publish orchestration, and GitHub Release creation all live inside. Three optional inputs: `environment` (default `release`), `node_version` (default `24`), `python_version` (default `3.12`). No `dry_run`, `working_directory`, or `config` inputs — the plan job is already side-effect-free, the config file is `putitoutthere.toml` at the repo root, period. The engine is invoked via `uses: thekevinscott/putitoutthere@v0` so the workflow file and the engine always agree on a single git ref.
|
|
16
16
|
|
|
17
17
|
- **`[package.bundle_cli]` recipe for maturin pypi packages** (#217). Opt-in declarative shape for libraries that ship a Rust CLI inside each wheel (the `ruff` / `uv` / `pydantic-core` pattern). Declare `bin`, `stage_to`, and optional `crate_path`; the reusable workflow cross-compiles the binary per target, stages it into the package source tree, and maturin picks it up via `[tool.maturin].include`. Requires `build = "maturin"` and non-empty `targets`. See [README → Recipes → Rust CLI inside a PyPI wheel](./README.md#rust-cli-inside-a-pypi-wheel). No behavior change for existing packages that don't declare the block.
|
|
18
18
|
|
|
@@ -21,6 +21,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
21
21
|
- **Public consumer surface collapsed to the README + the reusable workflow.** The CLI, the JS action (`action.yml`), and the diagnostic subcommands (`doctor`, `preflight`) are internal seams the reusable workflow invokes; consumers do not call them. The entire `docs/` directory is removed — `README.md` is the single user-facing surface. See [MIGRATIONS.md](./MIGRATIONS.md#public-surface-collapsed-to-a-reusable-workflow) for the before/after.
|
|
22
22
|
- **Auth is OIDC trusted publishers only.** The reusable workflow does not pass long-lived registry tokens (`NPM_TOKEN`, `PYPI_API_TOKEN`, `CARGO_REGISTRY_TOKEN`) as secrets. The engine's env-var fallback code paths still exist (in `src/auth.ts`); they're just not reachable through the reusable workflow.
|
|
23
23
|
- **Repository renamed `put-it-out-there` → `putitoutthere`.** GitHub auto-redirects the old slug, but consumers with the old URL pinned in `package.json`, `Cargo.toml`, `pyproject.toml`, or workflow files should update them. See [MIGRATIONS.md](./MIGRATIONS.md#repository-renamed-put-it-out-there--putitoutthere).
|
|
24
|
+
- **BREAKING: `[[package]].paths` renamed to `[[package]].globs`.** The `path`/`paths` pair was confusing — singular and plural differed only in a trailing `s` while meaning two unrelated things (the package working directory vs. the cascade-trigger globs). Configs declaring `paths` now fail validation. See [MIGRATIONS.md](./MIGRATIONS.md#package-paths-renamed-to-globs).
|
|
24
25
|
|
|
25
26
|
### Deprecated
|
|
26
27
|
|
|
@@ -33,6 +34,14 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
33
34
|
- **`build_workflow:` config field.** Removed from the schema in `src/config.ts`; configs declaring it now fail validation.
|
|
34
35
|
- **`putitoutthere init` subcommand** and the templates it scaffolded. Source removed (`src/init.ts`, `src/templates.ts`, plus tests, plus `--force` and `--cadence` flag plumbing).
|
|
35
36
|
- **`migrations/` directory** moved to `notes/migrations-pre-rewrite/`. Stale plans drafted against the prior hand-written-`release.yml` model.
|
|
37
|
+
- **`[package.trust_policy]` config block + the OIDC trust-policy diff machinery.** Removed: `src/oidc-policy.ts`, `src/registries/crates-trust.ts`, the `trust_policy` schema field, and the matching README section. The check was opt-in defensive validation — for npm + PyPI it could only verify "the workflow file you declared exists locally" (no public read API for trust-policy config), making it a typo-catcher rather than a real drift detector. crates.io's registry cross-check was the only path with real bug-catching power and required a separate `CRATES_IO_DOCTOR_TOKEN`. Net: false security; renaming `release.yml` still produces an HTTP 400 from the registry, which is the same UX as before and what every other tool gives you.
|
|
38
|
+
- **`putitoutthere doctor` subcommand + `src/doctor.ts`.** Its main job was the trust-policy validation phases above. With those gone, doctor was checking workflow structural details that are already validated by the reusable workflow's own shape. Internal seam, no consumer use case.
|
|
39
|
+
- **`putitoutthere preflight` subcommand + `src/preflight-run.ts`.** Standalone diagnostic CLI surface. The internal `requireAuth` check that gates `publish` is preserved (`src/preflight.ts` stays).
|
|
40
|
+
- **`putitoutthere token` subcommand + `src/token.ts`, `src/token-scope.ts`.** The `token list` / `token inspect` operator-debugging surface was built when long-lived registry tokens were the norm. Under OIDC-only there's nothing to enumerate or scope-check at the env level. ~1,100 lines removed.
|
|
41
|
+
- **`putitoutthere auth login/logout/status` subcommand + `src/auth.ts`, `src/keyring.ts`.** The GitHub App device-flow login existed solely to power `token list --secrets` (which fetched secret names via the GitHub API). With `token` removed, the App + keyring + device-flow plumbing is dead weight. ~500 lines removed. The `putitoutthere-cli` GitHub App registration is no longer used.
|
|
42
|
+
- **`src/release.ts` (engine-side GitHub Release creation).** Duplicated by the reusable workflow's `gh release create --generate-notes` step. The engine cuts the tag and stops; the workflow owns the Release. ~129 lines removed.
|
|
43
|
+
- **Dead config fields**: `cadence`, `agents_path`, `smoke`, `wheels_artifact`. Defined in the schema; never read anywhere in the engine.
|
|
44
|
+
- **`--preflight-check` flag on `publish`.** The deep token-scope check it gated was the sole consumer of `src/token-scope.ts`. Same reason as the `token` subcommand removal: under OIDC-only there's no long-lived token to scope-check.
|
|
36
45
|
|
|
37
46
|
### Fixed
|
|
38
47
|
|
package/MIGRATIONS.md
CHANGED
|
@@ -21,6 +21,83 @@ Each section covers five things, in order:
|
|
|
21
21
|
|
|
22
22
|
## Unreleased
|
|
23
23
|
|
|
24
|
+
### `[[package]].paths` renamed to `globs`
|
|
25
|
+
|
|
26
|
+
**Summary.** The `path` / `paths` pair in `[[package]]` was confusing —
|
|
27
|
+
singular and plural differed only in a trailing `s` while meaning two
|
|
28
|
+
unrelated things (the package working directory vs. the cascade-trigger
|
|
29
|
+
globs). Renaming `paths` → `globs` removes the trailing-S collision.
|
|
30
|
+
|
|
31
|
+
**Required changes.**
|
|
32
|
+
|
|
33
|
+
| Before | After |
|
|
34
|
+
|-----|-----|
|
|
35
|
+
| `paths = ["src/**", "pyproject.toml"]` | `globs = ["src/**", "pyproject.toml"]` |
|
|
36
|
+
|
|
37
|
+
Every `[[package]]` block in `putitoutthere.toml` needs the rename.
|
|
38
|
+
Configs declaring `paths` now fail validation under `.strict()`.
|
|
39
|
+
|
|
40
|
+
**Deprecations removed.** None.
|
|
41
|
+
|
|
42
|
+
**Behavior changes without code changes.** None — the field's semantics
|
|
43
|
+
are unchanged.
|
|
44
|
+
|
|
45
|
+
**Verification.** `pnpm exec putitoutthere plan` (or the next reusable-
|
|
46
|
+
workflow run) loads cleanly. A config still declaring `paths` fails
|
|
47
|
+
load with a Zod error pointing at the unknown key.
|
|
48
|
+
|
|
49
|
+
### Removed: diagnostic CLI surface, GitHub-App auth, trust-policy validation
|
|
50
|
+
|
|
51
|
+
**Summary.** Eight things removed in one pass, none consumer-observable
|
|
52
|
+
under the new "reusable workflow + OIDC-only" surface:
|
|
53
|
+
|
|
54
|
+
- `[package.trust_policy]` config block (false security: typo-catcher
|
|
55
|
+
for npm/PyPI; the only real check was the crates.io registry
|
|
56
|
+
cross-check, which required a separate token most consumers wouldn't
|
|
57
|
+
set up).
|
|
58
|
+
- `putitoutthere doctor` subcommand (its main job was the trust-policy
|
|
59
|
+
validation above).
|
|
60
|
+
- `putitoutthere preflight` subcommand (the internal `requireAuth`
|
|
61
|
+
gate inside `publish` is preserved).
|
|
62
|
+
- `putitoutthere token list/inspect` subcommands (operator-debugging
|
|
63
|
+
surface for long-lived registry tokens — none exist under OIDC-only).
|
|
64
|
+
- `putitoutthere auth login/logout/status` subcommands + the
|
|
65
|
+
`putitoutthere-cli` GitHub App's device-flow plumbing + the keyring
|
|
66
|
+
(only purpose was powering `token list --secrets`).
|
|
67
|
+
- `src/release.ts` engine-side GitHub Release creation (duplicated by
|
|
68
|
+
the reusable workflow's `gh release create --generate-notes` step).
|
|
69
|
+
- `publish --preflight-check` flag (deep token-scope check for
|
|
70
|
+
long-lived tokens; OIDC-only renders it moot).
|
|
71
|
+
- Dead config fields: `cadence`, `agents_path`, `smoke`,
|
|
72
|
+
`wheels_artifact` — defined in the schema, never read.
|
|
73
|
+
|
|
74
|
+
Net: ~2,800 lines of source removed, ~17% of `src/`.
|
|
75
|
+
|
|
76
|
+
**Required changes.**
|
|
77
|
+
|
|
78
|
+
| Before | After |
|
|
79
|
+
|-----|-----|
|
|
80
|
+
| `[package.trust_policy] workflow = "release.yml"` | Delete the block. Workflow renames still produce HTTP 400 from registries — same UX every other tool gives you. |
|
|
81
|
+
| `putitoutthere doctor` / `preflight` / `token` / `auth` invocations in any consumer script | Remove. None of these are reachable through the reusable workflow; consumer-facing surface is the workflow itself. |
|
|
82
|
+
| `cadence`, `agents_path`, `smoke`, `wheels_artifact` fields in `putitoutthere.toml` | Delete. They were never consumed; configs declaring them now fail validation under `.strict()`. |
|
|
83
|
+
| `--preflight-check` flag passed to `publish` | Drop. Internal `requireAuth` still gates publish. |
|
|
84
|
+
|
|
85
|
+
**Deprecations removed.** Everything in the list above.
|
|
86
|
+
|
|
87
|
+
**Behavior changes without code changes.** Engine behavior on the
|
|
88
|
+
plan / publish path is unchanged. `requireAuth` (the gate that
|
|
89
|
+
catches missing OIDC env or missing token) still runs; the deep
|
|
90
|
+
scope check (which required a long-lived token to inspect) no
|
|
91
|
+
longer runs because there's no long-lived token to inspect. GitHub
|
|
92
|
+
Release creation moves entirely to the reusable workflow's
|
|
93
|
+
`gh release create` step — engines invoked outside that workflow
|
|
94
|
+
(local dry-runs, custom integrations) no longer create Releases.
|
|
95
|
+
|
|
96
|
+
**Verification.** A consumer who never used any of the removed
|
|
97
|
+
surfaces sees no observable change. Consumers who used `doctor` or
|
|
98
|
+
`token` subcommands see exit-1 + "unknown command"; switch to the
|
|
99
|
+
reusable workflow.
|
|
100
|
+
|
|
24
101
|
### Public surface collapsed to a reusable workflow
|
|
25
102
|
|
|
26
103
|
**Summary.** The consumer surface is now one line in a `release.yml`:
|
|
@@ -31,7 +108,7 @@ on:
|
|
|
31
108
|
|
|
32
109
|
jobs:
|
|
33
110
|
release:
|
|
34
|
-
uses: thekevinscott/putitoutthere/.github/workflows/release.yml@
|
|
111
|
+
uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0
|
|
35
112
|
permissions:
|
|
36
113
|
contents: write
|
|
37
114
|
id-token: write
|
|
@@ -52,7 +129,7 @@ for the authoritative non-goals.
|
|
|
52
129
|
|
|
53
130
|
| Before (hand-written `release.yml`) | After |
|
|
54
131
|
|-----|-----|
|
|
55
|
-
| ~100 lines of YAML: plan/build/publish jobs, twine install, git identity, GitHub Release backfill, hand-pinned action majors | `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@
|
|
132
|
+
| ~100 lines of YAML: plan/build/publish jobs, twine install, git identity, GitHub Release backfill, hand-pinned action majors | `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0` |
|
|
56
133
|
| `putitoutthere init` to scaffold the workflow | Subcommand removed; consumers add the snippet above by hand |
|
|
57
134
|
| `[[package]].build_workflow = "publish-foo.yml"` for unsupported shapes | Removed. Shapes that don't fit piot's named build modes write their own release workflow that doesn't use piot |
|
|
58
135
|
| Long-lived registry tokens (`NPM_TOKEN`, `PYPI_API_TOKEN`, `CARGO_REGISTRY_TOKEN`) passed to a hand-written publish step | Not reachable through the reusable workflow. Register an OIDC trusted publisher per registry once |
|
|
@@ -85,7 +162,7 @@ known-tested versions.
|
|
|
85
162
|
|
|
86
163
|
- `pnpm test:unit` passes in the main repo.
|
|
87
164
|
- A consumer's first cutover: drop in the 12-line `release.yml`
|
|
88
|
-
shown above, push a commit that touches a `[[package]].
|
|
165
|
+
shown above, push a commit that touches a `[[package]].globs`
|
|
89
166
|
glob, and watch for a tag push + GitHub Release on the next
|
|
90
167
|
workflow run.
|
|
91
168
|
|
|
@@ -505,7 +582,7 @@ configurations are unchanged.
|
|
|
505
582
|
kind = "pypi"
|
|
506
583
|
build = "maturin"
|
|
507
584
|
path = "packages/python"
|
|
508
|
-
|
|
585
|
+
globs = ["packages/python/**"]
|
|
509
586
|
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin"]
|
|
510
587
|
+
|
|
511
588
|
+[package.bundle_cli]
|
|
@@ -525,7 +602,7 @@ And in the Python package's `pyproject.toml`:
|
|
|
525
602
|
+include = ["...", "src/my_py/_binary/**"] # ship the staged binary
|
|
526
603
|
```
|
|
527
604
|
|
|
528
|
-
See [
|
|
605
|
+
See [README → Rust CLI inside a PyPI wheel](https://github.com/thekevinscott/putitoutthere/blob/main/README.md#rust-cli-inside-a-pypi-wheel)
|
|
529
606
|
for the full worked example including the launcher stub.
|
|
530
607
|
|
|
531
608
|
**Deprecations removed.** None.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A reusable GitHub Actions workflow that publishes packages to crates.io, PyPI,
|
|
4
4
|
and npm from one repo. OIDC-first, cascade-aware, polyglot. The consumer
|
|
5
5
|
surface is one config file plus ~10 lines of YAML calling
|
|
6
|
-
`uses: thekevinscott/putitoutthere/.github/workflows/release.yml@
|
|
6
|
+
`uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0`.
|
|
7
7
|
|
|
8
8
|
## Quickstart
|
|
9
9
|
|
|
@@ -18,7 +18,7 @@ on:
|
|
|
18
18
|
|
|
19
19
|
jobs:
|
|
20
20
|
release:
|
|
21
|
-
uses: thekevinscott/putitoutthere/.github/workflows/release.yml@
|
|
21
|
+
uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0
|
|
22
22
|
permissions:
|
|
23
23
|
contents: write
|
|
24
24
|
id-token: write
|
|
@@ -45,13 +45,13 @@ version = 1
|
|
|
45
45
|
name = "my-lib"
|
|
46
46
|
kind = "pypi" # or "npm" | "crates"
|
|
47
47
|
path = "."
|
|
48
|
-
|
|
48
|
+
globs = ["src/**", "pyproject.toml"]
|
|
49
49
|
build = "hatch" # required for kind = "pypi"
|
|
50
50
|
tag_format = "v{version}" # single-package repos often want this
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
`
|
|
54
|
-
file makes the package a candidate.
|
|
53
|
+
`globs` are the path globs that trigger a release. Any commit touching a
|
|
54
|
+
matching file makes the package a candidate.
|
|
55
55
|
|
|
56
56
|
More config patterns are in [Configuration](#configuration) below.
|
|
57
57
|
|
|
@@ -63,7 +63,7 @@ registry.
|
|
|
63
63
|
|
|
64
64
|
### 4. Push a release
|
|
65
65
|
|
|
66
|
-
Merge to `main`. Default behavior: any package whose `
|
|
66
|
+
Merge to `main`. Default behavior: any package whose `globs` matched changed
|
|
67
67
|
files cascades and ships at `patch`. To bump `minor` or `major`:
|
|
68
68
|
|
|
69
69
|
```
|
|
@@ -92,11 +92,10 @@ version = 1 # required; only 1 is valid today
|
|
|
92
92
|
| `name` | string | yes | Unique across the config. |
|
|
93
93
|
| `kind` | enum | yes | `crates` \| `pypi` \| `npm`. |
|
|
94
94
|
| `path` | string | yes | Package working dir (`Cargo.toml` / `pyproject.toml` / `package.json` location). |
|
|
95
|
-
| `
|
|
95
|
+
| `globs` | string[] | yes | Path globs that cascade this package. |
|
|
96
96
|
| `depends_on` | string[] | no | Package names this one cascades on top of. |
|
|
97
97
|
| `first_version` | string | no | Default `0.1.0`. |
|
|
98
98
|
| `tag_format` | string | no | Template for the git tag. Default `"{name}-v{version}"`. Single-package repos often want `"v{version}"`. |
|
|
99
|
-
| `trust_policy` | table | no | Declared OIDC trust-policy expectations. See [Trusted publishers](#trusted-publishers). |
|
|
100
99
|
|
|
101
100
|
### `kind = "crates"`
|
|
102
101
|
|
|
@@ -134,13 +133,13 @@ One Rust crate feeds three artifacts:
|
|
|
134
133
|
name = "my-rust"
|
|
135
134
|
kind = "crates"
|
|
136
135
|
path = "crates/my-rust"
|
|
137
|
-
|
|
136
|
+
globs = ["crates/my-rust/**"]
|
|
138
137
|
|
|
139
138
|
[[package]]
|
|
140
139
|
name = "my-py"
|
|
141
140
|
kind = "pypi"
|
|
142
141
|
path = "py/my-py"
|
|
143
|
-
|
|
142
|
+
globs = ["py/my-py/**"]
|
|
144
143
|
build = "maturin"
|
|
145
144
|
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin"]
|
|
146
145
|
depends_on = ["my-rust"]
|
|
@@ -149,7 +148,7 @@ depends_on = ["my-rust"]
|
|
|
149
148
|
name = "my-cli"
|
|
150
149
|
kind = "npm"
|
|
151
150
|
path = "packages/ts"
|
|
152
|
-
|
|
151
|
+
globs = ["packages/ts/**"]
|
|
153
152
|
build = "bundled-cli"
|
|
154
153
|
targets = ["x86_64-unknown-linux-gnu", "aarch64-apple-darwin"]
|
|
155
154
|
depends_on = ["my-rust"]
|
|
@@ -165,20 +164,20 @@ wheels and npm family ship on top, version-bumped to match.
|
|
|
165
164
|
name = "@my/core"
|
|
166
165
|
kind = "npm"
|
|
167
166
|
path = "packages/core"
|
|
168
|
-
|
|
167
|
+
globs = ["packages/core/**"]
|
|
169
168
|
|
|
170
169
|
[[package]]
|
|
171
170
|
name = "@my/parser"
|
|
172
171
|
kind = "npm"
|
|
173
172
|
path = "packages/parser"
|
|
174
|
-
|
|
173
|
+
globs = ["packages/parser/**"]
|
|
175
174
|
depends_on = ["@my/core"]
|
|
176
175
|
```
|
|
177
176
|
|
|
178
177
|
## Trailer
|
|
179
178
|
|
|
180
179
|
The trailer is **optional**. Default behavior is `patch` whenever a package's
|
|
181
|
-
`
|
|
180
|
+
`globs` matched changed files.
|
|
182
181
|
|
|
183
182
|
Grammar:
|
|
184
183
|
|
|
@@ -203,7 +202,7 @@ are present, the **last** one wins.
|
|
|
203
202
|
## Cascade
|
|
204
203
|
|
|
205
204
|
A package cascades into the release plan when a commit changes any file
|
|
206
|
-
matching one of its `
|
|
205
|
+
matching one of its `globs` since its last tag. If another package
|
|
207
206
|
declares `depends_on = ["this-package"]`, that package also cascades.
|
|
208
207
|
Transitively, DFS-ordered, with cycle detection at config-load.
|
|
209
208
|
|
|
@@ -251,31 +250,6 @@ filename (`release.yml`), and optionally a GitHub environment name.
|
|
|
251
250
|
3. Fill in: repository, workflow filename, environment (optional).
|
|
252
251
|
4. Delete the bootstrap token.
|
|
253
252
|
|
|
254
|
-
### Catching trust-policy drift before release
|
|
255
|
-
|
|
256
|
-
Renaming `release.yml` to anything else, or renaming the environment, breaks
|
|
257
|
-
publish with an opaque HTTP 400 from the registry. To catch the rename
|
|
258
|
-
before it ships, declare the expected values in `putitoutthere.toml`:
|
|
259
|
-
|
|
260
|
-
```toml
|
|
261
|
-
[[package]]
|
|
262
|
-
name = "my-crate"
|
|
263
|
-
kind = "crates"
|
|
264
|
-
path = "crates/my-crate"
|
|
265
|
-
paths = ["crates/my-crate/**"]
|
|
266
|
-
|
|
267
|
-
[package.trust_policy]
|
|
268
|
-
workflow = "release.yml" # required; bare filename
|
|
269
|
-
environment = "release" # optional
|
|
270
|
-
repository = "my-org/my-crate" # optional
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
The engine diffs the declaration against the local workflow file and (in CI)
|
|
274
|
-
against `GITHUB_WORKFLOW_REF` before any registry call. For `kind = "crates"`,
|
|
275
|
-
a registry cross-check runs when `CRATES_IO_DOCTOR_TOKEN` is set — calls the
|
|
276
|
-
trusted-publishing read API and fails on mismatch. PyPI and npm don't expose
|
|
277
|
-
read APIs for trust policy, so the declared diff is the full gate there.
|
|
278
|
-
|
|
279
253
|
## Recipes
|
|
280
254
|
|
|
281
255
|
### Bundled-CLI npm family
|
|
@@ -293,7 +267,7 @@ kind = "npm"
|
|
|
293
267
|
npm = "my-cli"
|
|
294
268
|
build = "bundled-cli"
|
|
295
269
|
path = "packages/ts-cli"
|
|
296
|
-
|
|
270
|
+
globs = ["packages/ts-cli/**", "crates/my-cli/**"]
|
|
297
271
|
targets = [
|
|
298
272
|
"x86_64-unknown-linux-gnu",
|
|
299
273
|
"aarch64-unknown-linux-gnu",
|
|
@@ -363,7 +337,7 @@ name = "my-py"
|
|
|
363
337
|
kind = "pypi"
|
|
364
338
|
build = "maturin"
|
|
365
339
|
path = "packages/python"
|
|
366
|
-
|
|
340
|
+
globs = ["packages/python/**", "crates/my-rust/**"]
|
|
367
341
|
targets = [
|
|
368
342
|
"x86_64-unknown-linux-gnu",
|
|
369
343
|
"aarch64-unknown-linux-gnu",
|
package/action.yml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
name: 'Put It Out There (internal)'
|
|
2
|
-
description: 'Internal step-level wrapper around the putitoutthere CLI. Consumers compose with the reusable workflow at .github/workflows/release.yml@
|
|
2
|
+
description: 'Internal step-level wrapper around the putitoutthere CLI. Consumers compose with the reusable workflow at .github/workflows/release.yml@v0, not with this action directly. See notes/design-commitments.md non-goal #10.'
|
|
3
3
|
author: 'Kevin Scott'
|
|
4
4
|
|
|
5
5
|
inputs:
|
package/dist/cascade.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the last release, returns the packages that will release.
|
|
4
4
|
*
|
|
5
5
|
* Two passes (plan.md §11.1):
|
|
6
|
-
* 1. Direct match: every package whose `
|
|
6
|
+
* 1. Direct match: every package whose `globs` intersect the
|
|
7
7
|
* files changed since *its own* last tag is cascaded.
|
|
8
8
|
* 2. Transitive match: repeat until stable — any package whose
|
|
9
9
|
* `depends_on` list contains an already-cascaded package gets
|
package/dist/cascade.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* the last release, returns the packages that will release.
|
|
4
4
|
*
|
|
5
5
|
* Two passes (plan.md §11.1):
|
|
6
|
-
* 1. Direct match: every package whose `
|
|
6
|
+
* 1. Direct match: every package whose `globs` intersect the
|
|
7
7
|
* files changed since *its own* last tag is cascaded.
|
|
8
8
|
* 2. Transitive match: repeat until stable — any package whose
|
|
9
9
|
* `depends_on` list contains an already-cascaded package gets
|
|
@@ -35,7 +35,7 @@ export function computeCascade(packages, changedFilesByPackage) {
|
|
|
35
35
|
if (!files)
|
|
36
36
|
continue;
|
|
37
37
|
for (const f of files) {
|
|
38
|
-
if (matchesAny(p.
|
|
38
|
+
if (matchesAny(p.globs, f)) {
|
|
39
39
|
cascaded.add(p.name);
|
|
40
40
|
break;
|
|
41
41
|
}
|
package/dist/cli.d.ts
CHANGED
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* facing surface; flags / help text are stable enough to test, but
|
|
5
5
|
* not promised externally. See `notes/design-commitments.md`.
|
|
6
6
|
*
|
|
7
|
+
* Commands:
|
|
8
|
+
* plan — compute and emit the release plan
|
|
9
|
+
* publish — execute the plan against the registries
|
|
10
|
+
* version — print CLI version
|
|
11
|
+
*
|
|
7
12
|
* Global flags:
|
|
8
13
|
* --cwd <path> working directory (default: process.cwd())
|
|
9
14
|
* --config <path> path to putitoutthere.toml
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA2DH,wBAAsB,GAAG,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA+FlE"}
|