Repository navigation
Description
Tracking issue for making every merge to recoupable/cli main publish @recoupable/cli to npm automatically, without anyone's personal npm login. Status 2026-10-27: fixed. Merges to main publish via npm trusted publishing; 0.1.19 (with cli#26–28) is live with provenance. Remaining: revoke the old token on npm, and Sid's Owner role later. Before the fix, publishing had been broken since 2026-10-13. npm had stayed on 0.1.15 (published 2026-06-25) while main reached 0.1.18, so three merged PRs never shipped (cli#26, cli#27, cli#28). Raised on the 2026-10-26 Sid + Sweets call (notes): Sid's agent couldn't publish CLI changes because the package sits under Sweets' personal npm account.
Goal
- A merge to
recoupable/climainpublishes the new version to npm with no human step and no long-livedNPM_TOKENsecret (npm trusted publishing from GitHub Actions via OIDC). - The changes already on
main(cli#26–28) are live on npm. - A failed publish no longer leaves a version bump on
mainthat never reached npm. - Sid's account can administer the package without going through Sweets (Owner on the
recoupablenpm org).
PRs (updated 2026-10-27)
| PR | Item | State |
|---|---|---|
| npm settings (no PR) | Add a trusted publisher on @recoupable/cli for recoupable/cli → publish.yml |
✅ configured 2026-10-26; validated by the 0.1.19 publish — see Done |
| cli#29 | publish.yml on OIDC trusted publishing (drop NPM_TOKEN); bump only after a successful publish; add repository to package.json |
✅ merged 2026-10-27 — see Done |
| npm org (no PR) | Make Sid an Owner on the recoupable npm org |
⏳ deferred until Sid moves to a recoupable.com address |
All publishing work is merged and live; what remains is cleanup and the deferred Owner role.
Done
-
Configure npm trusted publishing for
@recoupable/cli. ✅ 2026-10-26: package settings listrecoupable/cli/publish.yml(label "publish on merge to main"; npm publish, stage publish and dist-tag allowed). npm showed "Pending validation" (deadline 2026-10-29 02:35 UTC) until the 0.1.19 publish on 2026-10-27; npm settings now show Status: Valid (confirmed by Sweets 2026-10-27). -
cli#29 — publish from
mainvia OIDC; bump only after publish. ✅ Shipped 2026-10-27 (squash-merged tomainasd575029; bump commita8bccbc).
publish.ymlnow hasid-token: write, Node 24 and npm^11.5.1, and runsnpm publishwith noNPM_TOKEN. The version bump starts from the higher of npm's latest andpackage.json, so a rerun never republishes (this addressed the CodeRabbit finding). The bump is committed and pushed only after the publish succeeds.package.jsonhasrepository.
Verified: publish run 40439687934 passed every step. Its log shows+ @recoupable/cli@0.1.19and "Signed provenance statement … from GitHub Actions" (sigstore 3502545448). The registry reportslatest: 0.1.19withbin.recoup = dist/bin.cjs.npx @recoupable/cli@0.1.19 --versionprints0.1.19, andsongs analyzewith no prompt fails locally before sending a request (the cli#26 behaviour). The bump commit landed after the publish step. npm's "pending validation" on the trusted publisher is cleared by this first publish. -
Deleted the
NPM_TOKENsecret fromrecoupable/cli. ✅ 2026-10-27, after confirming no workflow references it.gh secret list --repo recoupable/clinow returns 0 secrets.
Open — next up
- Revoke the old npm token (owner). The
NPM_TOKENrepo secret was deleted 2026-10-27 (see Done); the token itself may still exist on npmjs.com → Access Tokens.- Done when: no token for this package appears under Sweets' npm Access Tokens, and the next merge to
clistill publishes.
- Done when: no token for this package appears under Sweets' npm Access Tokens, and the next merge to
Open — later
- Sid as Owner on the
recoupablenpm org.- Status: 2026-10-26: Sweets invited
sydney@syncstream.aias a developer, and Sid accepted. npm's invite form offered only the developer role. - Fix: once Sid's npm account moves to a recoupable.com address, promote it to Owner on the
recoupableorg (npm org set recoupable <sid-username> owner, or the org's Members page). - Done when:
npm org ls recoupableshows Sid asowner. - With trusted publishing in place, Sid's agent doesn't need npm credentials to ship: merging to
mainis enough. Owner is for administering the package (settings, maintainers, deprecations).
- Status: 2026-10-26: Sweets invited
Architecture decisions
- Publish on merge, not by hand. Every merge to
mainships a patch release. Anyone who can merge torecoupable/clican release, and no npm credential is involved. - OIDC trusted publishing over a stored token. Nothing to rotate or leak, and publishing no longer depends on one person's account. Each release gets npm provenance tying the tarball to the exact workflow run.
Source references
- Workflow:
recoupable/cli/.github/workflows/publish.yml. Failed runs: Publish to npm history. - Earlier publish hardening: cli#25 (non-fast-forward bump push).
- npm docs: Trusted publishing.
Activity
[-]CLI: publish @recoupable/cli to npm on every merge via trusted publishing (publishing broken since 2026-10-13)[/-][+]CLI: publish @recoupable/cli to npm on every merge via trusted publishing[/+]