putitoutthere 0.2.6 → 0.2.8

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 CHANGED
@@ -12,6 +12,7 @@ are prefixed `**BREAKING**` and link to the matching section in
12
12
 
13
13
  ### Added
14
14
 
15
+ - **Reusable workflow `.github/workflows/build.yml` (`workflow_call`).** PR-time build verification: runs the same plan + build matrix that `release.yml` runs, calling a shared internal `_matrix.yml` reusable workflow so action pins, per-target build steps, and runner selection cannot drift between the two paths. `build.yml` declares only `permissions: contents: read` and contains no publish job, no `id-token: write`, no OIDC trusted-publisher exchange, and no registry auth — the bytes required to publish do not exist on this code path. Two optional inputs forwarded to `_matrix.yml`: `node_version` (default `24`), `python_version` (default `3.12`). Concurrency is keyed on `github.ref` with `cancel-in-progress: true` so PR pushes supersede stale runs (release.yml's repository-keyed group with `cancel-in-progress: false` is unchanged). An `actionlint`-job grep assertion rejects any future patch that adds `id-token: write` to `build.yml` or `_matrix.yml`. See [README → Build check](./README.md#1b-optional-drop-in-githubworkflowsbuild-checkyml) and [MIGRATIONS.md](./MIGRATIONS.md#new-buildyml-reusable-workflow-for-pr-time-build-verification).
15
16
  - **`PIOT_PUBLISH_EMPTY_PLAN` error code.** Surfaced when `publish` is invoked with an empty matrix. Joins `PIOT_AUTH_NO_TOKEN` in the stable error-code vocabulary; foreign agents debugging a failed publish can fingerprint on the code without parsing prose.
16
17
  - **`kind = "npm"` `build` accepts an array of entries with consumer-defined platform-package name templates.** For packages that ship both a napi-rs Node addon and a CLI binary from the same npm package (the `@swc/core` shape), declare `build = [{ mode = "napi", name = "@scope/lib-{triple}" }, { mode = "bundled-cli", name = "@scope/cli-{triple}" }]`. Each entry contributes its own per-platform package family; the main package's `optionalDependencies` spans both. Entries can be bare mode strings (`"napi"`, defaults to `{name}-{triple}` template) or `{ mode, name }` objects. Variables surfaced in `name` templates: `{name}`, `{scope}`, `{base}`, `{triple}`, `{mode}`. `{version}` is intentionally not surfaced. Single-mode string form (`build = "napi"`) preserved byte-for-byte — same artifact-name layout, same platform-package names, no migration pressure on existing consumers. See [README → Recipes → Multi-mode npm family](./README.md#multi-mode-npm-family) and [MIGRATIONS.md](./MIGRATIONS.md#npm-build-accepts-array-of-entries).
17
18
 
package/MIGRATIONS.md CHANGED
@@ -21,6 +21,76 @@ Each section covers five things, in order:
21
21
 
22
22
  ## Unreleased
23
23
 
24
+ ### New `build.yml` reusable workflow for PR-time build verification
25
+
26
+ **Summary.** A second consumer-facing reusable workflow,
27
+ `.github/workflows/build.yml`, runs the same plan + build matrix that
28
+ `release.yml` runs but stops there — no publish job, no
29
+ `id-token: write`, no OIDC exchange, no registry auth. Both workflows
30
+ delegate the matrix to a shared internal `_matrix.yml`, so action
31
+ pins (`actions/checkout@v6`, `PyO3/maturin-action@v1`, etc.), per-row
32
+ build steps, and runner selection cannot drift between PR-time
33
+ verification and release-time publishing. The structural guarantee —
34
+ publish-capable bytes do not exist on the build-check code path — is
35
+ what makes this safe to run on untrusted PRs; a `dry_run: true` input
36
+ on `release.yml` would have made it a runtime guarantee subject to
37
+ GHA's expression evaluation quirks and any future `if:` bug. An
38
+ `actionlint`-job grep assertion rejects any patch that adds
39
+ `id-token: write` to `build.yml` or `_matrix.yml`.
40
+
41
+ The new workflow runs at the same `@v0` floating tag as
42
+ `release.yml`, pinned the same way the engine action already is —
43
+ floating lightweight tag, no annotated-tag pitfall ([github/community
44
+ discussion #48693](https://github.com/orgs/community/discussions/48693)).
45
+ Pinning per-release annotated tags
46
+ (e.g. `putitoutthere-v0.4.2`) is unsupported for the same reason it has
47
+ always been unsupported for `release.yml`; the `@v0` form is canonical.
48
+
49
+ **Required changes.** None for existing consumers. `release.yml` is
50
+ unchanged in its public surface — same inputs, same `has_pypi`
51
+ output, same concurrency group, same publish behavior. Internally
52
+ its `plan` and `build` jobs moved into `_matrix.yml`, but that file
53
+ is internal (the leading underscore + the absence of consumer-facing
54
+ docs); pinning `release.yml@v0` keeps working byte-for-byte.
55
+
56
+ To opt into PR-time build verification, add a new workflow to your
57
+ repo:
58
+
59
+ ```yaml
60
+ # .github/workflows/build-check.yml
61
+ name: Build check
62
+ on:
63
+ pull_request: {}
64
+ jobs:
65
+ build-check:
66
+ uses: thekevinscott/putitoutthere/.github/workflows/build.yml@v0
67
+ ```
68
+
69
+ No new permissions, no new inputs to set. `node_version` and
70
+ `python_version` accept the same defaults / overrides as
71
+ `release.yml`. PRs that break a target-specific build (a wheel that
72
+ fails on `aarch64-apple-darwin`, an npm postinstall that fails on
73
+ Windows) now surface in review.
74
+
75
+ **Deprecations removed.** None.
76
+
77
+ **Behavior changes without code changes.** `release.yml`'s internal
78
+ job graph collapsed from `plan → build → publish` to
79
+ `build (uses: _matrix.yml) → publish`. The `publish` job now reads
80
+ `needs.build.outputs.matrix` instead of `needs.plan.outputs.matrix`;
81
+ the matrix payload is unchanged. Run logs show one nested-workflow
82
+ group (`build / plan`, `build / build`) instead of two top-level
83
+ jobs; existing log scrapers that fingerprint on the job name `plan`
84
+ need to fingerprint on `build / plan` instead.
85
+
86
+ **Verification.** On a repo that adds the build-check workflow, open
87
+ a PR that touches a `[[package]].globs` glob. The PR's Checks tab
88
+ shows a `build-check / build / build` matrix run. The job has no
89
+ `id-token: write` permission (visible in the `Show all checks` tag
90
+ on the run), and there is no `publish` job in the run's job graph.
91
+ On `main`, the existing release flow is unaffected — a tag push +
92
+ GitHub Release on the next workflow run.
93
+
24
94
  ### Crates dirty-check whitelists sibling package paths
25
95
 
26
96
  **Summary.** The engine's pre-publish dirty-workspace check
package/README.md CHANGED
@@ -69,6 +69,31 @@ Optional inputs — `with:` block at the call site:
69
69
  | `node_version` | `24` | You need a specific Node version for `kind = "npm"` build steps. |
70
70
  | `python_version` | `3.12` | You need a specific Python version for `kind = "pypi"` build steps. |
71
71
 
72
+ ### 1b. Optional: drop in `.github/workflows/build-check.yml`
73
+
74
+ Run the same plan + build matrix on every PR, with the publish step
75
+ structurally absent:
76
+
77
+ ```yaml
78
+ name: Build check
79
+
80
+ on:
81
+ pull_request: {}
82
+
83
+ jobs:
84
+ build-check:
85
+ uses: thekevinscott/putitoutthere/.github/workflows/build.yml@v0
86
+ ```
87
+
88
+ `build.yml` calls the same internal `_matrix.yml` reusable workflow that
89
+ `release.yml` does — same action pins, same per-target build steps, same
90
+ runners — so a PR that breaks `aarch64-apple-darwin` wheels surfaces
91
+ in review instead of at release time. The publish job, the
92
+ `id-token: write` permission, and the OIDC trusted-publisher exchanges
93
+ do not exist on this code path; there is no flag, no input, no
94
+ conditional that could ever cause it to publish. Same `node_version` /
95
+ `python_version` inputs as `release.yml`; no new config to write.
96
+
72
97
  ### 2. Drop in `putitoutthere.toml`
73
98
 
74
99
  ```toml
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putitoutthere",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Polyglot release orchestrator for crates.io, PyPI, and npm",
5
5
  "license": "MIT",
6
6
  "repository": {