Rename to unscoped otper-cli + use trusted publishing + fix build - #1
Merged
Conversation
added 3 commits
May 2, 2026 12:44
Trusted publishers authenticate via the GitHub Actions OIDC token (id-token: write is already set), so no long-lived NODE_AUTH_TOKEN secret is needed. --provenance is required and already in place.
- Move tsBuildInfoFile inside dist/ so 'rm -rf dist' clears it. Without this, tsc -b sees an up-to-date tsbuildinfo and emits nothing, resulting in a published tarball with no compiled commands. - Drop -b flag from build (no project references in use). - Drop oclif readme from prepack (manual README is curated). - Tighten files allowlist: only ship bin/run.js (not bin/dev.ts), dist, and the oclif manifest.
Switching from @ssntpl/otper-cli to otper-cli so: - npm install -g otper-cli works (no scope to remember) - Publish doesn't require an org with 2FA enforcement - Bin name remains 'otper' Updates package.json name, README install/library examples, src/index.ts header comment, and drops --access public from publish workflow (unscoped packages are public by default).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three related changes that together get the package publishable end-to-end.
1. Rename
@ssntpl/otper-cli→otper-clinpm install -g otper-cli.otper.2. Switch CI to npm trusted publishing (OIDC)
NODE_AUTH_TOKENenv frompublish.yml.permissions: id-token: writeand--provenance— that is everything OIDC needs.3. Fix the build so dist/ ships
tsconfig.tsbuildinfoat the repo root madetsc -bskip emit afterrm -rf dist. The 0.1.0 attempt would have published a 6-file tarball with no commands.tsBuildInfoFileinsidedist/so it gets nuked together; drop-b(no project references in use).oclif readmefrom prepack (manual README is curated).filesallowlist: onlybin/run.js(notbin/dev.ts),dist, andoclif.manifest.json.Test plan
npm run buildproduces 100+ files indist/commands/npm pack --dry-runshows ~206 files, ~60 kBnpm publishlocally to bootstrap 0.1.0