putitoutthere 0.2.17 → 0.2.19
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 +3 -0
- package/MIGRATIONS.md +131 -0
- package/README.md +34 -13
- package/dist/normalize-artifacts.d.ts +32 -0
- package/dist/normalize-artifacts.d.ts.map +1 -0
- package/dist/normalize-artifacts.js +57 -0
- package/dist/normalize-artifacts.js.map +1 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +5 -0
- package/dist/publish.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
13
13
|
### Added
|
|
14
14
|
|
|
15
15
|
- **`[package.bundle_cli]` accepts `features` and `no_default_features` for crates that gate the CLI behind a Cargo feature.** The lib-with-optional-CLI pattern — `[[bin]] required-features = ["cli"]` so `cargo add <name>` doesn't drag the CLI's deps onto library consumers — is the standard shape for crates that fit `bundle_cli`'s use case (ruff, uv, pydantic-core, biome, swc, dirsql). v0.2.0's wiring shipped `cargo build --release --target $TARGET --bin $BIN` with no `--features` path, which made the recipe inert for exactly the consumers it targets. The reusable workflow's cargo build step now appends `--features <comma-list>` when the schema's new `features: list[string]` is non-empty and `--no-default-features` when the new `no_default_features: bool` is true. Defaults are `[]` and `false`, so existing `[package.bundle_cli]` blocks keep building byte-identically. Empty-string entries inside `features` are rejected at config load. The "crates that gate the CLI behind a Cargo feature are not currently supported" caveat in the v0.2.0 MIGRATIONS note has been corrected. See [README → Recipes → Rust CLI inside a PyPI wheel](./README.md#rust-cli-inside-a-pypi-wheel) and [MIGRATIONS.md](./MIGRATIONS.md#bundle_cli-features-and-no_default_features). #300.
|
|
16
|
+
- **Reusable workflow accepts a caller-provided `NPM_TOKEN` via `secrets:`.** OIDC trusted publishers remain the default and recommended path, but Trusted Publishing on npm binds to an *already-published* package — so the first publish of a brand-new npm package has no OIDC path available, and consumers were forced into a manual 6+ package `0.0.0-bootstrap` stub bootstrap (documented nowhere, only discoverable by reading commit history of dirsql or by hitting the failure). The `workflow_call` surface now declares an optional `NPM_TOKEN` secret; when set AND the planned matrix contains an npm row, the secret is exported to `$GITHUB_ENV` as `NODE_AUTH_TOKEN` and the npm CLI prefers the long-lived token over the OIDC path. Callers without a token keep the OIDC path unchanged. For bundled-cli / napi families the same secret authenticates publishes of all per-platform sub-packages on first publish; once those exist, each one needs its own Trusted Publisher registration (the bypass is a one-time bootstrap, not a permanent path). Mirrors the #283 crates fallback in shape. Hit in the wild on the maintainer's own dirsql project (first version of `@dirsql/cli-linux-x64-gnu` on npm is `0.0.0-bootstrap`, 2026-04-30; real `0.2.8` lands the next day) and on `darkfactory`'s first publish. See [README → Trusted publishers → npm](./README.md#npm) and [MIGRATIONS.md](./MIGRATIONS.md#npm-token-fallback). #302.
|
|
16
17
|
- **Reusable workflow accepts a caller-provided `CARGO_REGISTRY_TOKEN` via `secrets:`.** OIDC trusted publishers remain the default and recommended path, but Trusted Publishing on crates.io binds to an *already-published* crate — so the first publish of a brand-new crate has no OIDC path available, and consumers were forced to either fork the workflow or run `cargo publish` outside it. The `workflow_call` surface now declares an optional `CARGO_REGISTRY_TOKEN` secret; when set, the `rust-lang/crates-io-auth-action` OIDC exchange is skipped and the caller-provided token is exported to `$GITHUB_ENV` for the engine's crates handler to read. Callers without a token keep the OIDC path unchanged. The "Auth: OIDC trusted publishers ... Long-lived registry tokens are explicitly NOT supported" framing in `release.yml`'s header has been softened to match. See [README → Trusted publishers → crates.io](./README.md#cratesio) and [MIGRATIONS.md](./MIGRATIONS.md#crates-token-fallback). #283.
|
|
17
18
|
- **Preflight check: every cascaded `kind = "crates"` package's `Cargo.toml` must declare `[package].description` and either `[package].license` or `[package].license-file`.** crates.io rejects publish with `400 Bad Request: missing or empty metadata fields: ...` after `cargo publish`'s verification build has compiled the crate and every transitive dep — wasting the entire publish job on a precondition checkable in milliseconds. The new `requireCratesMetadata` runs alongside `requireAuth` / `requireProvenanceMetadata` in `src/publish.ts`, before any side effects, and reports every failing package + every missing field in one error rather than failing on the first. Surfaces a new stable error code, `PIOT_CRATES_MISSING_METADATA`. Whitespace-only field values are treated as empty. Hit in the wild on `thekevinscott/darkfactory`'s first crate publish; same shape as #280 (npm `repository`). See [MIGRATIONS.md](./MIGRATIONS.md#crates-cargo-toml-must-declare-description-and-license). #290.
|
|
18
19
|
- **Preflight check: every cascaded `kind = "npm"` package must declare a non-empty `repository` field in `package.json`.** `putitoutthere` invokes `npm publish --provenance` on the OIDC trusted-publisher path, and the npm CLI hard-requires this field so the registry can verify the artifact was built from the repo the trusted publisher declares. A missing or empty field previously surfaced as a confusing tail-end npm error after the runner had spun up, OIDC had been negotiated, and the artifact had been built — wasting a full release run on a precondition checkable in milliseconds. The new `requireProvenanceMetadata` runs alongside `requireAuth` in `src/publish.ts`, before any side effects, and reports every failing package in one error rather than failing on the first. Surfaces a new stable error code, `PIOT_NPM_MISSING_REPOSITORY`. Both the canonical object form (`{ type, url, directory? }`) and the legacy single-string form are accepted; only an empty `url` (or no `url` at all) fails. The npm handler's inline backstop is also tightened to match the same predicate (previously `!pkg.repository` slipped `{}`, `{ type: 'git' }`, and whitespace strings through). Documented in [README → `kind = "npm"`](./README.md#kind--npm). See [MIGRATIONS.md](./MIGRATIONS.md#npm-package-json-must-declare-repository). #280.
|
|
@@ -34,6 +35,8 @@ are prefixed `**BREAKING**` and link to the matching section in
|
|
|
34
35
|
|
|
35
36
|
### Fixed
|
|
36
37
|
|
|
38
|
+
- **Single-artifact publish jobs no longer fail completeness with `missing artifact directory <name>/`.** `actions/download-artifact@v8` is count-sensitive: with `path: artifacts` and no `name`/`pattern` filter, multiple artifacts each get their own `artifacts/<name>/` subdir (the documented multi-case the engine relies on), but a single artifact extracts directly into `artifacts/` with no per-artifact subdir. Consumers whose plan emits exactly one expected artifact — canonical case: pure-Python `[[package]]` with `build = "hatch"`, which emits an sdist row only — therefore aborted at the engine's completeness check before any side effect ran. The reusable workflow's publish job now normalizes the layout in-process before completeness: when the plan expects a single staged artifact and the documented subdir is absent, files in `artifacts/` are moved into `artifacts/<artifact_name>/` so the rest of the engine sees the contract it was written against. No-op in the multi-artifact case, when the subdir already exists, or when nothing was downloaded (crates-only / vanilla-npm plans). No consumer-side change required. Hit in the wild on a pypi-only consumer with a single sdist row; multi-artifact consumers (pypi + npm, or sdist + wheels) were unaffected. See [MIGRATIONS.md](./MIGRATIONS.md#single-artifact-publish-layout-normalization). #311.
|
|
39
|
+
|
|
37
40
|
- **Bundled-CLI / napi npm consumers' `npm run build` step now sees `TARGET` and `BUILD` env vars on every matrix row.** The reusable workflow's `_matrix.yml` and `release.yml` previously ran the npm build step with no env block, so consumers' build scripts that read `process.env.TARGET` to know which triple to cross-compile saw `undefined` and either crashed or silently no-oped. Every per-platform matrix row then uploaded an empty `build/<triple>/` directory and `actions/upload-artifact@v7` flagged `No files were found with the provided path: ...`. The internal `e2e-fixture-job.yml` already passed `TARGET` / `BUILD` correctly — meaning the fixture suite passed but a real consumer's first publish still failed; an integration-tier divergence rather than a behavior bug per se. Both the build matrix step and the publish-job rebuild step in `release.yml` now set the env block. `_matrix.yml` exposes `TARGET=${{ matrix.target }}` / `BUILD=${{ matrix.build }}` per row; `release.yml`'s rebuild loop sets `TARGET=main BUILD=` per iteration (the publish-time rebuild only fires for the main package's row, since per-platform sub-packages stage from `artifacts/` via the engine's npm-platform handler). The README's [Bundled-CLI npm family](./README.md#bundled-cli-npm-family) recipe gained the consumer-side build-script contract that was previously missing — TARGET/BUILD vocabulary and a minimal `scripts/build.cjs` covering the simple single-workspace case. Hit in the wild on `thekevinscott/darkfactory`'s first release; tracked at #287. See [MIGRATIONS.md](./MIGRATIONS.md#npm-build-step-target-build-env-vars).
|
|
38
41
|
|
|
39
42
|
- **First-publish bundled-cli / napi npm builds no longer fail on lockfile drift.** Consumers of the bundled-cli / napi shape declare `optionalDependencies` for `<name>-<triple>@<version>` platform packages that this pipeline publishes. On the very first publish those entries 404 on the registry; pnpm 10 silently drops 404'd optionals from the lockfile when it is regenerated locally; a subsequent CI run with `pnpm install --frozen-lockfile` (or `npm ci`) refuses because lockfile and `package.json` disagree. Both install steps in the reusable workflow — `_matrix.yml`'s build-matrix install and `release.yml`'s publish-job rebuild step (added in #256) — now self-heal: a failed strict install falls back to its non-strict form (`pnpm install --no-frozen-lockfile` / `npm install`) with a `::warning::` line in the run log naming the recovery. No consumer-side change required; lockfiles can stay committed and `optionalDependencies` can stay declared. Hit in the wild on `thekevinscott/darkfactory`'s first release (#integration-2026-05-bundled-cli). The README's [Bundled-CLI npm family](./README.md#bundled-cli-npm-family) recipe grew a `[!NOTE]` callout documenting the chicken-and-egg and the workflow's transparent recovery. See [MIGRATIONS.md](./MIGRATIONS.md#first-publish-bundled-cli-lockfile-self-heal).
|
package/MIGRATIONS.md
CHANGED
|
@@ -21,6 +21,58 @@ Each section covers five things, in order:
|
|
|
21
21
|
|
|
22
22
|
## Unreleased
|
|
23
23
|
|
|
24
|
+
### Single-artifact publish layout normalization
|
|
25
|
+
|
|
26
|
+
**Summary.** The reusable workflow's publish job downloads build
|
|
27
|
+
artifacts with `actions/download-artifact@v8` configured as `path:
|
|
28
|
+
artifacts` and no `name`/`pattern` filter. That action is
|
|
29
|
+
count-sensitive: multiple artifacts land in `artifacts/<name>/...`
|
|
30
|
+
subdirs (the documented multi-case the engine's completeness check
|
|
31
|
+
and every handler are written against), but a *single* artifact
|
|
32
|
+
extracts directly into `artifacts/` with no per-artifact subdir.
|
|
33
|
+
Consumers whose plan emits exactly one expected artifact — pure-Python
|
|
34
|
+
packages with `build = "hatch"` (sdist row only) being the canonical
|
|
35
|
+
case — therefore failed at the completeness check with `missing
|
|
36
|
+
artifact directory <pkg>-sdist/` before the pypi handler ever ran.
|
|
37
|
+
Multi-artifact consumers (pypi+npm, sdist+wheels, polyglot) were
|
|
38
|
+
unaffected. The publish job now normalizes the layout in-process
|
|
39
|
+
before completeness: when the plan expects one staged artifact and
|
|
40
|
+
`artifacts/<artifact_name>/` is absent, files in `artifacts/` are
|
|
41
|
+
moved into that subdir so the engine's contract holds. Fully a
|
|
42
|
+
fix-in-place; no input shape, output shape, or config key changed.
|
|
43
|
+
Tracked in #311.
|
|
44
|
+
|
|
45
|
+
**Required changes.** None.
|
|
46
|
+
|
|
47
|
+
**Deprecations removed.** None.
|
|
48
|
+
|
|
49
|
+
**Behavior changes without code changes.**
|
|
50
|
+
|
|
51
|
+
- Pypi-only consumers with `build = "hatch"` (or any other
|
|
52
|
+
`[[package]]` whose plan emits a single artifact row) that
|
|
53
|
+
previously failed publish with `Artifact completeness check
|
|
54
|
+
failed: ... missing artifact directory <pkg>-sdist/` now reach the
|
|
55
|
+
pypi handler successfully and tag as expected. The wider release
|
|
56
|
+
flow — version-rewrite, tag creation, GitHub Release, caller-side
|
|
57
|
+
`pypi-publish` upload — was already correct; only the engine's
|
|
58
|
+
pre-publish completeness check was upstream of the bug.
|
|
59
|
+
- Multi-artifact plans (≥2 staged artifacts), crates-only plans, and
|
|
60
|
+
vanilla-npm plans (`[[package]] kind = "npm"` with no `build` /
|
|
61
|
+
`build = []`) see no observable difference. The normalization is
|
|
62
|
+
scoped to the exact case `download-artifact@v8` dumps into the
|
|
63
|
+
root.
|
|
64
|
+
|
|
65
|
+
**Verification.** A release-please / release-plz cascade against a
|
|
66
|
+
pure-Python `[[package]]` with `build = "hatch"` should:
|
|
67
|
+
|
|
68
|
+
1. Surface the planned matrix as a single row,
|
|
69
|
+
`target = sdist artifact = <pkg>-sdist`.
|
|
70
|
+
2. Reach the `pypi: <pkg>@<version> delegated to caller-side upload
|
|
71
|
+
step.` log line in the publish job.
|
|
72
|
+
3. Push a `<pkg>-v<version>` tag, kick off the caller's
|
|
73
|
+
`pypi-publish` job, and produce a GitHub Release. No
|
|
74
|
+
`missing artifact directory` error appears in the run log.
|
|
75
|
+
|
|
24
76
|
### `[package.bundle_cli]` features and `no_default_features`
|
|
25
77
|
|
|
26
78
|
**Summary.** `[package.bundle_cli]` previously only worked for crates
|
|
@@ -359,6 +411,85 @@ or build-check run.
|
|
|
359
411
|
|
|
360
412
|
---
|
|
361
413
|
|
|
414
|
+
### npm token fallback
|
|
415
|
+
|
|
416
|
+
**Summary.** The reusable workflow now accepts an optional
|
|
417
|
+
`NPM_TOKEN` via `secrets:`. Trusted Publishing on npm binds to
|
|
418
|
+
an *already-published* package, so the very first publish of a
|
|
419
|
+
brand-new npm package has no OIDC path available; without this
|
|
420
|
+
fallback every first-time bundled-cli / napi consumer hit a 6+
|
|
421
|
+
package manual `0.0.0-bootstrap` stub bootstrap, documented
|
|
422
|
+
nowhere, only discoverable by reading commit history of dirsql
|
|
423
|
+
or by hitting the failure. OIDC trusted publishers remain the
|
|
424
|
+
default and recommended path — when the secret is unset,
|
|
425
|
+
behavior is byte-for-byte unchanged. When the secret is set
|
|
426
|
+
AND the planned matrix contains an npm row, the secret is
|
|
427
|
+
exported to `$GITHUB_ENV` as `NODE_AUTH_TOKEN`; the npm CLI
|
|
428
|
+
then prefers the long-lived token over the OIDC path. Mirror
|
|
429
|
+
of #283 (crates) in shape, byte-for-byte. Hit in the wild on
|
|
430
|
+
the maintainer's own dirsql project (first version of
|
|
431
|
+
`@dirsql/cli-linux-x64-gnu` on npm is `0.0.0-bootstrap`,
|
|
432
|
+
2026-04-30; real `0.2.8` lands the next day) and on
|
|
433
|
+
`darkfactory`'s first publish. #302.
|
|
434
|
+
|
|
435
|
+
**Required changes.** None for consumers already on the OIDC
|
|
436
|
+
path. To bootstrap a brand-new npm package or to use the
|
|
437
|
+
workflow on an account where Trusted Publishing isn't
|
|
438
|
+
available, wire the secret in the caller's `release.yml`:
|
|
439
|
+
|
|
440
|
+
| Before | After |
|
|
441
|
+
| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
442
|
+
| `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0` | `uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0`<br>`secrets:`<br>` NPM_TOKEN: ${{ secrets.NPM_TOKEN }}` |
|
|
443
|
+
|
|
444
|
+
The repo-level secret holding the npm automation token can be
|
|
445
|
+
named anything; the *workflow* secret it gets passed as must be
|
|
446
|
+
`NPM_TOKEN` exactly — the reusable workflow keys on that name.
|
|
447
|
+
Drop the `secrets:` block from the caller's `release.yml` once
|
|
448
|
+
Trusted Publishing is registered against the (now-existing)
|
|
449
|
+
package; subsequent publishes are zero-secret. For bundled-cli
|
|
450
|
+
/ napi families each per-platform sub-package needs its own
|
|
451
|
+
Trusted Publisher registration after the first publish — the
|
|
452
|
+
secret-bypass is a one-time bootstrap, not a permanent path.
|
|
453
|
+
|
|
454
|
+
**Deprecations removed.** None.
|
|
455
|
+
|
|
456
|
+
**Behavior changes without code changes.** None when the secret
|
|
457
|
+
is unset (OIDC path unchanged). When the secret is set, a new
|
|
458
|
+
"Export NODE_AUTH_TOKEN (caller-provided)" step writes
|
|
459
|
+
`NODE_AUTH_TOKEN` to `$GITHUB_ENV` gated on the secret being
|
|
460
|
+
non-empty AND the planned matrix containing an npm row. The
|
|
461
|
+
gate reads the secret through a job-level `CALLER_NPM_TOKEN`
|
|
462
|
+
env var because GitHub Actions does not allow the `secrets`
|
|
463
|
+
context inside step-level `if:` conditions ([context
|
|
464
|
+
availability](https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability));
|
|
465
|
+
this is an internal mechanism — consumers don't see or set
|
|
466
|
+
`CALLER_NPM_TOKEN` themselves. Unlike #283 (crates), there is
|
|
467
|
+
no separate OIDC step to "skip" — the npm CLI handles OIDC
|
|
468
|
+
internally via the runner's id-token, and the presence of
|
|
469
|
+
`NODE_AUTH_TOKEN` in the env is what switches the CLI's auth
|
|
470
|
+
mode.
|
|
471
|
+
|
|
472
|
+
**Verification.** Wire `NPM_TOKEN` to a valid npm automation
|
|
473
|
+
token in the caller repo and trigger a release of a brand-new
|
|
474
|
+
package. The publish-job logs should show "Export
|
|
475
|
+
NODE_AUTH_TOKEN (caller-provided)" as `success`; `npm publish`
|
|
476
|
+
authenticates with the long-lived token rather than via OIDC,
|
|
477
|
+
and every per-platform sub-package in a bundled-cli / napi
|
|
478
|
+
family lands on the registry in a single run. Once first
|
|
479
|
+
publish succeeds, register Trusted Publishers against each
|
|
480
|
+
package URL, drop the `secrets:` block, and re-run a release
|
|
481
|
+
— the OIDC path covers the steady state from there.
|
|
482
|
+
|
|
483
|
+
Verified end-to-end against existing seeded fixtures and a
|
|
484
|
+
real first-publish on a canary repo. The Verdaccio
|
|
485
|
+
first-publish fixture coverage for the same path is tracked
|
|
486
|
+
separately at #293; until that lands this fallback is verified
|
|
487
|
+
by composition (mirror of #283) plus consumer-side observation
|
|
488
|
+
on real first publishes rather than by an automated
|
|
489
|
+
fresh-state fixture in this repo's CI.
|
|
490
|
+
|
|
491
|
+
---
|
|
492
|
+
|
|
362
493
|
### Crates token fallback
|
|
363
494
|
|
|
364
495
|
**Summary.** The reusable workflow now accepts an optional
|
package/README.md
CHANGED
|
@@ -329,14 +329,15 @@ releases without fighting registry-immutable-publish semantics.
|
|
|
329
329
|
## Trusted publishers
|
|
330
330
|
|
|
331
331
|
OIDC trusted publishers are the default and recommended auth path.
|
|
332
|
-
The reusable workflow also accepts
|
|
333
|
-
via `secrets:` for cases
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
332
|
+
The reusable workflow also accepts long-lived `CARGO_REGISTRY_TOKEN`
|
|
333
|
+
(crates.io) and `NPM_TOKEN` (npm) values via `secrets:` for cases
|
|
334
|
+
where Trusted Publishing isn't reachable — most commonly the very
|
|
335
|
+
first publish of a brand-new crate or npm package, since Trusted
|
|
336
|
+
Publishing on both registries binds to an *already-published*
|
|
337
|
+
package and neither has a pending-publisher equivalent. When set,
|
|
338
|
+
the OIDC exchange is skipped and the caller-provided token is used
|
|
339
|
+
instead. Drop the secret once Trusted Publishing is registered
|
|
340
|
+
against the existing package.
|
|
340
341
|
|
|
341
342
|
For all three registries the OIDC fields are the same: **your**
|
|
342
343
|
repository owner/name, **your** workflow filename (`release.yml`),
|
|
@@ -382,14 +383,34 @@ see "How auth flows" below for the why.
|
|
|
382
383
|
|
|
383
384
|
### npm
|
|
384
385
|
|
|
385
|
-
1.
|
|
386
|
-
|
|
387
|
-
|
|
386
|
+
1. **First publish (brand-new package).** Trusted Publishing on npm
|
|
387
|
+
binds to an existing package, so the first `npm publish` has no
|
|
388
|
+
OIDC path. Pass `NPM_TOKEN` to the reusable workflow via
|
|
389
|
+
`secrets:` to bootstrap through this workflow:
|
|
390
|
+
|
|
391
|
+
```yaml
|
|
392
|
+
jobs:
|
|
393
|
+
release:
|
|
394
|
+
uses: thekevinscott/putitoutthere/.github/workflows/release.yml@v0
|
|
395
|
+
secrets:
|
|
396
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
When `NPM_TOKEN` is set, it is exported to the publish step's
|
|
400
|
+
environment as `NODE_AUTH_TOKEN` and the npm CLI prefers it over
|
|
401
|
+
the OIDC path. For bundled-cli / napi families the same secret
|
|
402
|
+
authenticates publishes of all per-platform sub-packages on first
|
|
403
|
+
publish — once those exist, each one needs its own Trusted
|
|
404
|
+
Publisher registration (the bypass is a one-time bootstrap, not
|
|
405
|
+
a permanent path).
|
|
388
406
|
2. Go to `https://www.npmjs.com/package/<name>/access` → **Require trusted
|
|
389
407
|
publisher**.
|
|
390
408
|
3. Fill in: your repository, workflow filename (`release.yml`),
|
|
391
|
-
environment (optional).
|
|
392
|
-
|
|
409
|
+
environment (optional). Repeat for every per-platform sub-package
|
|
410
|
+
for bundled-cli / napi families.
|
|
411
|
+
4. Drop the `NPM_TOKEN` secret from the workflow once Trusted
|
|
412
|
+
Publishing is registered; subsequent publishes are zero-secret on
|
|
413
|
+
the OIDC path.
|
|
393
414
|
|
|
394
415
|
### How auth flows
|
|
395
416
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-artifact layout normalization.
|
|
3
|
+
*
|
|
4
|
+
* `actions/download-artifact@v8` is count-sensitive when called with
|
|
5
|
+
* `path:` and no `name`/`pattern` filter: multiple artifacts get
|
|
6
|
+
* per-artifact subdirectories (the documented multi-case the engine
|
|
7
|
+
* relies on), but a *single* artifact extracts directly into the path
|
|
8
|
+
* with no `<artifact_name>/` subdir. The completeness check
|
|
9
|
+
* (`src/completeness.ts`) and every downstream handler reach for
|
|
10
|
+
* `artifacts/<artifact_name>/...`, so consumers whose plan emits one
|
|
11
|
+
* row — canonical case: pure-Python + `build = "hatch"`, sdist only —
|
|
12
|
+
* fail before any side effect runs.
|
|
13
|
+
*
|
|
14
|
+
* Rather than fight the action's per-count behavior in YAML (where the
|
|
15
|
+
* subdir-vs-flat decision lives in upstream code we don't control),
|
|
16
|
+
* normalize the layout in-process before completeness so the engine's
|
|
17
|
+
* own contract is the single source of truth. The reusable workflow
|
|
18
|
+
* calls into this via `publish.ts`; no consumer-facing surface.
|
|
19
|
+
*
|
|
20
|
+
* Issue #311.
|
|
21
|
+
*/
|
|
22
|
+
import type { MatrixRow } from './plan.js';
|
|
23
|
+
/**
|
|
24
|
+
* Move dumped-into-root artifact files into the documented
|
|
25
|
+
* `<artifactsRoot>/<artifact_name>/` subdir when the plan expects
|
|
26
|
+
* exactly one staged artifact and the download step did not create
|
|
27
|
+
* the subdir. No-op in every other case (multi-artifact, already
|
|
28
|
+
* subdir-shaped, nothing downloaded, crates-only / vanilla-npm plans
|
|
29
|
+
* that stage nothing).
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizeArtifactLayout(matrix: readonly MatrixRow[], artifactsRoot: string): void;
|
|
32
|
+
//# sourceMappingURL=normalize-artifacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-artifacts.d.ts","sourceRoot":"","sources":["../src/normalize-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAE3C;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,aAAa,EAAE,MAAM,GACpB,IAAI,CAyBN"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-artifact layout normalization.
|
|
3
|
+
*
|
|
4
|
+
* `actions/download-artifact@v8` is count-sensitive when called with
|
|
5
|
+
* `path:` and no `name`/`pattern` filter: multiple artifacts get
|
|
6
|
+
* per-artifact subdirectories (the documented multi-case the engine
|
|
7
|
+
* relies on), but a *single* artifact extracts directly into the path
|
|
8
|
+
* with no `<artifact_name>/` subdir. The completeness check
|
|
9
|
+
* (`src/completeness.ts`) and every downstream handler reach for
|
|
10
|
+
* `artifacts/<artifact_name>/...`, so consumers whose plan emits one
|
|
11
|
+
* row — canonical case: pure-Python + `build = "hatch"`, sdist only —
|
|
12
|
+
* fail before any side effect runs.
|
|
13
|
+
*
|
|
14
|
+
* Rather than fight the action's per-count behavior in YAML (where the
|
|
15
|
+
* subdir-vs-flat decision lives in upstream code we don't control),
|
|
16
|
+
* normalize the layout in-process before completeness so the engine's
|
|
17
|
+
* own contract is the single source of truth. The reusable workflow
|
|
18
|
+
* calls into this via `publish.ts`; no consumer-facing surface.
|
|
19
|
+
*
|
|
20
|
+
* Issue #311.
|
|
21
|
+
*/
|
|
22
|
+
import { existsSync, mkdirSync, readdirSync, renameSync } from 'node:fs';
|
|
23
|
+
import { join } from 'node:path';
|
|
24
|
+
/**
|
|
25
|
+
* Move dumped-into-root artifact files into the documented
|
|
26
|
+
* `<artifactsRoot>/<artifact_name>/` subdir when the plan expects
|
|
27
|
+
* exactly one staged artifact and the download step did not create
|
|
28
|
+
* the subdir. No-op in every other case (multi-artifact, already
|
|
29
|
+
* subdir-shaped, nothing downloaded, crates-only / vanilla-npm plans
|
|
30
|
+
* that stage nothing).
|
|
31
|
+
*/
|
|
32
|
+
export function normalizeArtifactLayout(matrix, artifactsRoot) {
|
|
33
|
+
// Only rows whose handler expects a staged artifact directory. crates
|
|
34
|
+
// publishes from the source tree (no upload step in the build job);
|
|
35
|
+
// vanilla npm packages the source on the publish runner. completeness
|
|
36
|
+
// already short-circuits both kinds — see `src/completeness.ts`.
|
|
37
|
+
const expected = matrix.filter((r) => r.kind !== 'crates' && !(r.kind === 'npm' && r.target === 'noarch'));
|
|
38
|
+
if (expected.length !== 1)
|
|
39
|
+
return;
|
|
40
|
+
const row = expected[0];
|
|
41
|
+
const targetDir = join(artifactsRoot, row.artifact_name);
|
|
42
|
+
// Already in the documented layout — either a multi-artifact run
|
|
43
|
+
// earlier in the same job, or a developer running locally with the
|
|
44
|
+
// engine's contract honored. Either way, leave it alone.
|
|
45
|
+
if (existsSync(targetDir))
|
|
46
|
+
return;
|
|
47
|
+
if (!existsSync(artifactsRoot))
|
|
48
|
+
return;
|
|
49
|
+
const dumped = readdirSync(artifactsRoot);
|
|
50
|
+
if (dumped.length === 0)
|
|
51
|
+
return;
|
|
52
|
+
mkdirSync(targetDir, { recursive: true });
|
|
53
|
+
for (const entry of dumped) {
|
|
54
|
+
renameSync(join(artifactsRoot, entry), join(targetDir, entry));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=normalize-artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-artifacts.js","sourceRoot":"","sources":["../src/normalize-artifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;;;;GAOG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAA4B,EAC5B,aAAqB;IAErB,sEAAsE;IACtE,oEAAoE;IACpE,sEAAsE;IACtE,iEAAiE;IACjE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAC5B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,QAAQ,CAAC,CAC3E,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAElC,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAE,CAAC;IACzB,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC;IACzD,iEAAiE;IACjE,mEAAmE;IACnE,yDAAyD;IACzD,IAAI,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO;IAClC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAAE,OAAO;IAEvC,MAAM,MAAM,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAC1C,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAEhC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IACjE,CAAC;AACH,CAAC"}
|
package/dist/publish.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAeH,OAAO,EAA6B,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAGzF,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,OAAO,CAAC;CACjD;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAoJ1E"}
|
package/dist/publish.js
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
import { isAbsolute, join, resolve } from 'node:path';
|
|
19
19
|
import { loadConfig } from './config.js';
|
|
20
20
|
import { checkCompleteness } from './completeness.js';
|
|
21
|
+
import { normalizeArtifactLayout } from './normalize-artifacts.js';
|
|
21
22
|
import { ErrorCodes } from './error-codes.js';
|
|
22
23
|
import { createTag, headCommit, pushTag } from './git.js';
|
|
23
24
|
import { handlerFor as defaultHandlerFor } from './handlers/index.js';
|
|
@@ -78,6 +79,10 @@ export async function publish(opts) {
|
|
|
78
79
|
// dep — same wasted-work argument as 2b. #290.
|
|
79
80
|
requireCratesMetadata(selectedPackages);
|
|
80
81
|
// 3. Artifact completeness.
|
|
82
|
+
// First normalize the layout in case actions/download-artifact@v8
|
|
83
|
+
// dumped a single artifact directly into `artifacts/` rather than
|
|
84
|
+
// creating `artifacts/<name>/`. #311.
|
|
85
|
+
normalizeArtifactLayout(matrix, artifactsRoot(cwd));
|
|
81
86
|
const completeness = checkCompleteness(matrix, artifactsRoot(cwd));
|
|
82
87
|
const incomplete = [...completeness.entries()].filter(([, r]) => !r.ok);
|
|
83
88
|
if (incomplete.length > 0) {
|
package/dist/publish.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../src/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAgB,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,IAAI,EAAkB,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,eAAe,EAA8C,MAAM,YAAY,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAc3C,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,IAAoB;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;IACrB,uDAAuD;IACvD,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,GAAG,EAAE,oBAAoB,CAAC,CAAC;IACnE,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACnC,sEAAsE;IACtE,oEAAoE;IACpE,sEA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