Skip to content

ci: add tag-based release workflow and npm publish scripts#2

Merged
posokhin merged 1 commit intomainfrom
feature/implementV1
Mar 8, 2026
Merged

ci: add tag-based release workflow and npm publish scripts#2
posokhin merged 1 commit intomainfrom
feature/implementV1

Conversation

@posokhin
Copy link
Copy Markdown
Owner

@posokhin posokhin commented Mar 8, 2026

Summary

  • Adds release:patch, release:minor, release:major scripts to package.json — each bumps the version, creates a git tag, and pushes with --follow-tags
  • Adds .github/workflows/release.yml triggered on v*.*.* tags: runs full CI (type-check, lint, test, build), publishes to npm using NPM_TOKEN secret, and creates a GitHub Release with auto-generated notes via softprops/action-gh-release@v2
  • Exports Layer4Error from the public entry point (src/index.ts)

Release flow

npm run release:patch   # bumps 1.0.0 → 1.0.1, creates tag v1.0.1
  └─ git push --follow-tags
        └─ GitHub Actions: tag v*.*.*
              ├─ type-check · lint · test · build
              ├─ npm publish
              └─ GitHub Release (auto notes)

Prerequisites (one-time manual step)

Add NPM_TOKEN secret in GitHub:

Settings → Secrets and variables → Actions → New repository secret
  Name:  NPM_TOKEN
  Value: <npm automation token>

Test plan

  • Merge this PR
  • Add NPM_TOKEN secret in repo settings
  • Run npm publish --dry-run locally to verify package contents
  • Run npm run release:patch and check the Actions tab
  • Verify package appears on npmjs.com and release appears on GitHub Releases

🤖 Generated with Claude Code

- Add release:patch/minor/major scripts to package.json that bump version, commit, tag, and push
- Add .github/workflows/release.yml triggered on v*.*.* tags: runs type-check, lint, test, build, publishes to npm, and creates GitHub Release with auto-generated notes
- Export Layer4Error from public entry point

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@posokhin posokhin merged commit 1d2ae70 into main Mar 8, 2026
1 check passed
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