Skip to content

Improve release workflow: support major/minor bumps and auto-update changelog#63

Merged
jancurn merged 1 commit intomainfrom
claude/version-bump-decision-4mb27
Mar 12, 2026
Merged

Improve release workflow: support major/minor bumps and auto-update changelog#63
jancurn merged 1 commit intomainfrom
claude/version-bump-decision-4mb27

Conversation

@jancurn
Copy link
Member

@jancurn jancurn commented Mar 12, 2026

Summary

This PR enhances the release workflow to support semantic versioning (major, minor, patch) bumps and automates changelog management for releases.

Key Changes

  • Semantic version bumping: Extended the version bump input to support major, minor, and patch options (previously only supported patch). The workflow now correctly computes the next base version according to the selected bump type.

  • Improved beta version handling: Enhanced logic to detect when the current version is already a beta and intelligently determine whether to reuse or increment the base version, preventing unnecessary re-bumping.

  • Automated CHANGELOG.md updates: Added a new step that automatically updates CHANGELOG.md during releases by:

    • Moving the [Unreleased] section and creating a new dated entry for the released version
    • Updating comparison links at the bottom of the changelog to reflect the new version
  • Automated git operations: Added a new step to commit version bumps, changelog updates, and create annotated git tags during releases, streamlining the release process.

  • Fixed release target: Changed the GitHub release creation to target the newly created version tag instead of the commit SHA, ensuring the release points to the correct tag.

  • Updated input description: Removed "(release only)" from the version bump input description since it now applies to both pre-release and release workflows.

Implementation Details

The version computation logic now:

  1. Strips any existing beta suffix from the current version
  2. Applies the selected bump type (major/minor/patch) to compute the next base version
  3. Checks if already on a beta for that base version to avoid unnecessary re-bumping
  4. Queries npm for existing betas and either increments from the latest or starts at beta.0

The changelog update uses sed to maintain the existing format while inserting new version entries with today's date and updating comparison links.

https://claude.ai/code/session_0117LM1TVEG466NibhowB3Tg

… changelog

Two issues fixed:

1. Pre-release ignored the version input (patch/minor/major) and always
   computed the next patch. Selecting "minor" for 0.1.10 produced
   0.1.11-beta.x instead of 0.2.0-beta.x. Now uses inputs.version to
   compute the correct base version.

2. Release did not update CHANGELOG.md or commit back to main. Now the
   workflow replaces [Unreleased] with the new version/date, updates
   comparison links, commits package.json + CHANGELOG.md, tags, and
   pushes to main before publishing. GitHub release targets the tag
   instead of the triggering SHA.

https://claude.ai/code/session_0117LM1TVEG466NibhowB3Tg
@jancurn jancurn merged commit 6751419 into main Mar 12, 2026
6 checks 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.

3 participants