Skip to content

ci: termlens-cli is on crates.io; make the next release say so honestly - #294

Merged
vyncint merged 1 commit into
mainfrom
cli-published
Sep 8, 2026
Merged

ci: termlens-cli is on crates.io; make the next release say so honestly#294
vyncint merged 1 commit into
mainfrom
cli-published

Conversation

@vyncint

@vyncint vyncint commented Sep 8, 2026

Copy link
Copy Markdown
Owner

termlens-cli 0.10.0 is published (2026-09-08, via the publish-cli.yml bootstrap). Verified the way a user meets it, not from this tree:

$ cargo install termlens-cli --locked        # Downloaded termlens-cli v0.10.0
$ termlens --version                         # termlens 0.10.0
$ termlens inspect --size 30x4 sh -c 'printf "hello from a pty"'
size: 30x4  cursor: 0,16
hello from a pty
--- exited: exit code 0 ---
$ termlens diff --color never before.snap after.snap.new ; echo $?
… 2 rows unchanged
styles: 0: 0-4 fg=6 bold; 7-13 reverse → 0-4 fg=6 bold
1

The reason this is a PR and not just a report. release.yml's CLI step guarded itself with "does crates.io know this crate?" and skipped with a warning. crates.io now answers 200, so next tag it will run — and Trusted Publishing is configured per crate, so the OIDC token minted for termlens does not carry termlens-cli until that crate has a publisher of its own. The failure would be a bare 403, arriving after termlens is already published. The step now names the likely cause, the exact place to fix it, and warns that re-running the job fails on the other crate instead.

docs/RELEASING.md claimed publishing stores no secret anywhere; that is currently false, so the prerequisites now list both crates, mark termlens-cli as not yet linked, and carry the teardown. Its "first publish" section becomes a general recipe for bootstrapping a brand-new crate rather than a to-do item.

Still yours to do (needs a crates.io login, so I can't): link Trusted Publishing for termlens-cli → crates.io → termlens-cli → Settings → Trusted Publishing → GitHub, repository vyncint/termlens, workflow release.yml, environment release. Say the word afterwards and I'll delete publish-cli.yml and its zizmor entry; you delete the CARGO_REGISTRY_TOKEN secret. I've deliberately not removed the workflow yet — until the link exists it is the only working path for a termlens-cli release.

Refs #255

Published 0.10.0 on 2026-09-08 through the publish-cli.yml bootstrap, and
verified the way a user meets it rather than from this tree: `cargo
install termlens-cli --locked` from the registry, then `inspect` driving a
real PTY, `diff` exiting 1 on a difference, `render --svg` and `--ansi`.

That changes what release.yml does next time, and not for the better
unless it is handled. The step guarded itself with "does crates.io know
this crate?" and skipped with a warning; crates.io now answers 200, so it
will run — and Trusted Publishing is configured *per crate*, so the OIDC
token minted for `termlens` does not carry `termlens-cli` until that crate
has a publisher of its own. The failure would be a bare 403, arriving
after `termlens` is already published, which is the worst moment to be
cryptic. The step now says what is almost certainly wrong, where to fix
it, and warns that re-running the job will fail on the other crate
instead.

RELEASING.md said publishing stores no secret anywhere. That is currently
false — CARGO_REGISTRY_TOKEN exists for exactly one bootstrap — so the
prerequisites now list both crates, mark termlens-cli as not yet linked,
and carry the teardown: link it, revoke the token, delete the secret,
delete the workflow. Its "first publish" section is now a general
recipe for a brand-new crate rather than a to-do.

Refs #255

Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
@vyncint
vyncint merged commit daff78f into main Sep 8, 2026
15 checks passed
@vyncint
vyncint deleted the cli-published branch September 8, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant