Skip to content

Add npm publish workflow and prepublish build step#42

Merged
that-github-user merged 1 commit intomainfrom
issue-28-npm-publish
Mar 28, 2026
Merged

Add npm publish workflow and prepublish build step#42
that-github-user merged 1 commit intomainfrom
issue-28-npm-publish

Conversation

@that-github-user
Copy link
Copy Markdown
Owner

Summary

  • Add prepublishOnly script that builds and tests before npm publish
  • Add files field to package.json limiting published files to dist/, README, LICENSE
  • Add release.yml workflow: triggers on v* tags, publishes to npm with provenance, creates GitHub Release

Change type

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI / infrastructure
  • Chore

Related issue

Closes #28

How to test

  1. npm pack --dry-run — should list only dist/, README.md, LICENSE, package.json
  2. Release workflow activates on git tag v0.1.0 && git push --tags
  3. Requires NPM_TOKEN secret configured in GitHub repo settings

Breaking changes

  • This PR introduces breaking changes

🤖 Generated with Claude Code

- prepublishOnly script: builds + tests before npm publish
- files field: only includes dist/, README.md, LICENSE in package
- GitHub Actions release workflow: triggers on v* tags, publishes to npm
  with provenance, creates GitHub Release with auto-generated notes

Closes #28

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@that-github-user
Copy link
Copy Markdown
Owner Author

Self-review: prepublishOnly runs build+test as safety net. files field prevents publishing src/, tests, config files. Release workflow uses npm provenance for supply chain security. 41 tests pass.

@that-github-user that-github-user merged commit 0eb70ef into main Mar 28, 2026
@that-github-user that-github-user deleted the issue-28-npm-publish branch March 28, 2026 17:15
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.

Add npm publish workflow and prepublish build step

1 participant