Skip to content

chore: replace release-npm-action with simple release script#100

Merged
rohal12 merged 1 commit intomainfrom
chore/always-release-on-merge
Mar 22, 2026
Merged

chore: replace release-npm-action with simple release script#100
rohal12 merged 1 commit intomainfrom
chore/always-release-on-merge

Conversation

@rohal12
Copy link
Owner

@rohal12 rohal12 commented Mar 22, 2026

Summary

Replace tobua/release-npm-action with an inline release script that always publishes on every merge to main, regardless of commit message format.

Version bump is determined from commits since the last git tag:

  • BREAKING CHANGE in commit body → major
  • feat: prefix → minor
  • Everything else (fix:, chore:, docs:, untagged, merge commits) → patch

Other details:

  • Skips release if HEAD is already tagged (prevents duplicates)
  • Creates a git tag (vX.Y.Z) and GitHub release with auto-generated notes
  • Uses actions/setup-node with registry-url for npm auth
  • Removes dependency on tobua/release-npm-action

Test plan

  • Merge a feat: PR → verify minor version bump + npm publish
  • Merge a chore: PR → verify patch version bump + npm publish
  • Verify git tag and GitHub release are created

🤖 Generated with Claude Code

@github-actions
Copy link

github-actions bot commented Mar 22, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.92% 2401 / 3042
🔵 Statements 78.02% 2627 / 3367
🔵 Functions 70.91% 434 / 612
🔵 Branches 73.58% 1312 / 1783
File CoverageNo changed files found.
Generated in workflow #167 for commit cc6e63a by the Vitest Coverage Report Action

Replace tobua/release-npm-action with an inline release script that
always publishes on merge to main. Version bump is determined from
commits since the last tag:
- BREAKING CHANGE in body → major
- feat: prefix → minor
- everything else (fix, chore, docs, untagged) → patch

Skips release if HEAD is already tagged to prevent duplicates.
Creates a git tag and GitHub release with auto-generated notes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rohal12 rohal12 force-pushed the chore/always-release-on-merge branch from 35203c1 to cc6e63a Compare March 22, 2026 11:33
@rohal12 rohal12 changed the title chore: always attempt npm release on merge to main chore: replace release-npm-action with simple release script Mar 22, 2026
@rohal12 rohal12 merged commit 3461e65 into main Mar 22, 2026
4 checks passed
@rohal12 rohal12 deleted the chore/always-release-on-merge branch March 22, 2026 11:42
rohal12 pushed a commit that referenced this pull request Mar 22, 2026
The previous grep pattern matched "BREAKING CHANGE" anywhere in commit
bodies, which false-positived on the PR #100 commit that mentioned the
phrase in a bullet point describing the release rules.

Now requires either:
- "BREAKING CHANGE: " at the start of a line (conventional footer)
- "type!: " pattern in the commit subject (e.g., "feat!: drop v1 API")

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rohal12 pushed a commit that referenced this pull request Mar 22, 2026
The previous grep pattern matched "BREAKING CHANGE" anywhere in commit
bodies, which false-positived on the PR #100 commit that mentioned the
phrase in a bullet point describing the release rules.

Now requires either:
- "BREAKING CHANGE: " at the start of a line (conventional footer)
- "type!: " pattern in the commit subject (e.g., "feat!: drop v1 API")

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rohal12 added a commit that referenced this pull request Mar 22, 2026
## Summary

Two fixes that were pushed to the #100 branch after it was already
merged:

- **Fix major-bump false positive**: Require `BREAKING CHANGE: ` at
start of line (conventional footer) or `type!: ` in commit subject — no
longer matches the phrase mentioned casually in commit bodies (which
caused the accidental v1.0.0)
- **Version preview workflow**: Comments on PRs with the predicted
version on open/push/title edit, e.g. "merging this PR will publish
**v0.32.1** (patch bump from v0.32.0)". Updates the same comment instead
of creating duplicates.

## Test plan

- [ ] This PR itself should get a version preview comment predicting
v0.32.1
- [ ] Merging should publish v0.32.1 (patch, not major)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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