Skip to content

Add npm publish workflow (NPM_TOKEN) - #7

Merged
rakshith48 merged 1 commit into
mainfrom
feat/npm-publish-workflow
Jun 17, 2026
Merged

rakshith48 merged 1 commit into
mainfrom
feat/npm-publish-workflow

Conversation

@rakshith48

Copy link
Copy Markdown
Collaborator

Sets up automated npm publishing using the NPM_TOKEN secret @mogery added to the repo.

  • .github/workflows/publish.yml — runs on GitHub Release published or manual workflow_dispatch; npm publish --provenance --access public with NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}.
  • prepublishOnly: node --test — every publish is gated on the 14 tests.
  • npm pkg fix normalized the bin path (./bin/... → bin/...), clearing the prior publish warning. Dry-run is now clean (4 files, 7.2 kB).

Does not publish on merge — publishing is deliberate: create a release or dispatch the workflow.

To publish 0.1.0: merge this, then either create a GitHub Release tagged v0.1.0, or run the "Publish to npm" workflow manually.

Note: --provenance needs id-token: write (set). If the first run errors on provenance, drop that flag and re-run.

🤖 Generated with Claude Code

- .github/workflows/publish.yml: publish on GitHub Release (or manual
  workflow_dispatch) via NODE_AUTH_TOKEN=secrets.NPM_TOKEN, with provenance
- package.json: prepublishOnly runs `node --test` so publish is test-gated;
  bin path normalized via `npm pkg fix` (clears publish warning)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@rakshith48
rakshith48 merged commit d660e45 into main Jun 17, 2026
3 checks passed
@rakshith48
rakshith48 deleted the feat/npm-publish-workflow branch June 17, 2026 00:18
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