Skip to content

feat: add semantic-release for automatic versioning#50

Merged
TonyCasey merged 1 commit intomainfrom
git-74-semantic-release
Feb 14, 2026
Merged

feat: add semantic-release for automatic versioning#50
TonyCasey merged 1 commit intomainfrom
git-74-semantic-release

Conversation

@TonyCasey
Copy link
Copy Markdown
Owner

@TonyCasey TonyCasey commented Feb 14, 2026

Summary

Adds semantic-release to automatically version and publish releases based on conventional commits.

How it works:

  • On merge to main, semantic-release analyzes commits since last release
  • Determines version bump based on commit prefixes
  • Updates CHANGELOG.md, package.json
  • Creates GitHub release with release notes
  • Publishes to npm

Version bump rules:

Commit prefix Version bump Example
feat: Minor 0.3.0 → 0.4.0
fix:, perf:, refactor: Patch 0.3.0 → 0.3.1
BREAKING CHANGE: Major 0.3.0 → 1.0.0
docs:, chore:, test:, ci: No release

Changes:

  • Add .releaserc.json with semantic-release config
  • Update release-on-merge.yml to use semantic-release
  • Remove redundant npm-publish.yml (semantic-release handles this)
  • Add devDependencies: semantic-release, @semantic-release/changelog, @semantic-release/git, conventional-changelog-conventionalcommits

Test plan

  • Merge this PR
  • Verify semantic-release runs in CI
  • Confirm no release is created (this PR is a feat: but we may want to manually tag first)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated the release pipeline to use semantic versioning for automated version management.
    • Version numbers will now be automatically determined based on the types of changes merged.

- Add semantic-release with conventional commits analyzer
- Auto-bump version based on commit prefixes (feat: minor, fix: patch)
- Auto-generate CHANGELOG.md entries
- Auto-publish to npm and create GitHub releases
- Remove redundant npm-publish workflow

Commit prefix rules:
- feat: → minor version bump (0.x.0)
- fix:/perf:/refactor: → patch version bump (0.0.x)
- BREAKING CHANGE: → major version bump (x.0.0)
- docs:/style:/chore:/test:/ci: → no release

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AI-Agent: Claude-Code/2.1.42
AI-Model: claude-opus-4-5-20251101
Copilot AI review requested due to automatic review settings February 14, 2026 09:52
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 14, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR transitions the repository's release pipeline from manual npm publishing triggered on PR merges to a semantic-release-based automated system triggered on pushes to main. It removes the legacy npm-publish workflow, introduces semantic-release configuration, and refactors the release-on-merge workflow accordingly.

Changes

Cohort / File(s) Summary
Release Workflow Files
github/workflows/npm-publish.yml, github/workflows/release-on-merge.yml
Removes the dedicated npm-publish workflow and reworks release-on-merge to use semantic-release instead of manual versioning and publishing, now triggering on pushes to main with automated version detection and changelog generation.
Semantic Release Configuration
.releaserc.json
Introduces semantic-release configuration with conventional commits analyzer, changelog generator, and npm/github publish plugins to automate versioning and release processes.
Dependencies
package.json
Adds semantic-release and related dev dependencies (@semantic-release/changelog, @semantic-release/git, conventional-changelog-conventionalcommits).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch git-74-semantic-release

Comment @coderabbitai help to get the list of available commands and usage tips.

@TonyCasey TonyCasey merged commit 7cae6f0 into main Feb 14, 2026
6 of 7 checks passed
@TonyCasey TonyCasey deleted the git-74-semantic-release branch February 14, 2026 09:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the release process by replacing manual version bumping with automated semantic-release, which analyzes conventional commits to determine version bumps and automatically publishes releases.

Changes:

  • Adds semantic-release automation with conventional commit analysis
  • Consolidates release workflow into a single semantic-release-based pipeline
  • Removes redundant npm-publish workflow (semantic-release handles this)

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

File Description
package.json Adds semantic-release and related plugins as devDependencies
.releaserc.json Configures semantic-release with conventional commit rules, changelog generation, and automated npm/GitHub publishing
.github/workflows/release-on-merge.yml Replaces manual release workflow with semantic-release automation, triggers on push to main
.github/workflows/npm-publish.yml Removed (redundant with semantic-release handling npm publish)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 34 to 41
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run tests
run: npm test
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Release workflow duplicates build and test steps that already run in the CI workflow. Both workflows trigger on push to main, causing redundant test execution. Consider either:

  1. Remove the build/test steps from this workflow and add a needs: test dependency on the CI workflow's test job, or
  2. Prevent the CI workflow from running on push to main when the Release workflow runs (e.g., by checking commit message for '[skip ci]' or using path filters)

Option 1 is generally preferred as it ensures tests pass before release without duplicating work.

Copilot uses AI. Check for mistakes.
Comment thread .releaserc.json
"changelogFile": "CHANGELOG.md",
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)."
}],
"@semantic-release/npm",
Copy link

Copilot AI Feb 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding explicit npm publish configuration to ensure public access. While unscoped packages default to public access, it's safer to be explicit. You can either:

  1. Add to package.json: "publishConfig": { "access": "public" }
  2. Or configure the semantic-release npm plugin in .releaserc.json: ["@semantic-release/npm", { "npmPublish": true, "pkgRoot": "." }]

Option 1 is generally preferred as it's more visible and matches the previous workflow's --access public flag.

Suggested change
"@semantic-release/npm",
["@semantic-release/npm", { "npmPublish": true, "pkgRoot": "." }],

Copilot uses AI. Check for mistakes.
@TonyCasey TonyCasey restored the git-74-semantic-release branch February 14, 2026 15:10
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.

2 participants