Skip to content

docs: add the trusted publishing recipe to the docs and the skills - #198

Merged
dangreen merged 1 commit into
mainfrom
docs/trusted-publishing
Sep 5, 2026
Merged

docs: add the trusted publishing recipe to the docs and the skills#198
dangreen merged 1 commit into
mainfrom
docs/trusted-publishing

Conversation

@dangreen

@dangreen dangreen commented Sep 5, 2026

Copy link
Copy Markdown
Member

Summary

Documents the token-less npm publishing flow already running in nano_kit, Argue, and nanoviews, and teaches both agent skills about it.

New page: GitHub Action → Trusted Publishing

  • Requirements from the npm docs: public npm registry on GitHub-hosted runners, npm CLI 11.5.1+ (Node.js 24 ships it, Node.js 22 ships npm 10), the package must already exist on npm, one registration per package and per workflow file.
  • Setup: register the trusted publisher on npmjs.com or with npm trust github ... --file release.yml --allow-publish; in the release job add id-token: write, drop registry-url and npm-token, use Node.js 24. The expected publish log with the provenance lines is shown, taken from a real nano_kit release.
  • Snapshots: the registration is bound to the workflow file, so the snapshot job is folded into release.yml behind a snapshot dispatch input with if: inputs.snapshot == '' on check — the layout from nano_kit and nanoviews, verified by their dispatch runs. The separate snapshot.yml remains possible with a second registration (npm allows up to ten per package).
  • Provenance: automatic for public repositories, opt-out via publishConfig.provenance.
  • ENEEDAUTH causes.

Existing pages — release automation, snapshot release, action inputs, and agent skills link to the new page.

Skills

  • setup-simple-release-action: the token-or-trusted-publishing choice joins the single add-ons question; detection from existing workflows (id-token: write, no token); prerequisites including the npm view <name> version existence check; the trusted publishing workflow variation; the folded snapshot layout; the registration steps in the final checklist.
  • simple-release-action: recognizes the layout when reading the setup, dispatches snapshots through release.yml, and diagnoses ENEEDAUTH.

Test plan

🤖 Generated with Claude Code

A new GitHub Action page describes publishing to npm without a token, as set up in nano_kit, Argue, and nanoviews: `id-token: write` on the publishing jobs, no `registry-url` and no `npm-token`, Node.js 24 for npm 11.5.1+, the trusted publisher registered per package and workflow file on npmjs.com (or with `npm trust github`), the snapshot job folded into `release.yml` behind a `snapshot` dispatch input because the registration is bound to the workflow file, automatic provenance, and the ENEEDAUTH causes. The release automation, snapshot, inputs, and agent skills pages link to it. The setup skill offers the token-or-trusted-publishing choice, detects it from existing workflows, generates the corresponding release job and the folded snapshot layout, and puts the registration into the final checklist; the simple-release-action skill recognizes the layout, dispatches snapshots through `release.yml`, and diagnoses ENEEDAUTH.
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 33973681226

Coverage remained the same at 69.769%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1046
Covered Lines: 725
Line Coverage: 69.31%
Relevant Branches: 211
Covered Branches: 152
Branch Coverage: 72.04%
Branches in Coverage %: Yes
Coverage Strength: 11.05 hits per line

💛 - Coveralls

@dangreen
dangreen merged commit 9779d2b into main Sep 5, 2026
6 checks passed
@dangreen
dangreen deleted the docs/trusted-publishing branch September 5, 2026 15:07
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.

2 participants