Skip to content

Conversation

@laysakura
Copy link
Contributor

Summary

  • Fixed incorrect version bump detection that caused 0.1.0 → 1.0.0 instead of 0.1.0 → 0.2.0
  • Improved changelog parsing to check for actual entries, not just section headers

Problem

The release workflow was detecting empty ### Removed section as a major version bump, resulting in version 1.0.0 instead of the expected 0.2.0.

Solution

  1. Updated version detection logic in .github/workflows/release.yml:

    • Now checks for actual entries (lines starting with -) within each section
    • Empty sections are ignored
    • Only sections with content trigger version bumps
  2. Cleaned up CHANGELOG.md:

    • Removed empty sections (Changed, Deprecated, Removed, Fixed, Security)
    • Keep only sections with actual content

Testing

After merge, the next release should correctly detect:

  • ### Added section has entries → Minor version bump (0.1.0 → 0.2.0)
  • Empty sections are ignored

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

…og sections

- Fixed version bump logic to check for actual entries (lines starting with '-')
  instead of just checking for section headers
- Removed empty changelog sections that were causing incorrect major version bump
- Now correctly detects that only Added section has entries, resulting in minor bump
- Reverted type aliases to use TypeAlias annotation (typer compatibility)
- Added UP040 to ruff ignore rules since typer doesn't support new type syntax
- Fixed mypy python_version from incorrect '1.0.0' to '3.11'
- Cleaned up CHANGELOG.md formatting
- Moved content from Unreleased to 1.0.0 section
- Removed empty subsections
- Fixed version comparison links
- Changed version back to 0.1.0 in pyproject.toml and __init__.py
- Moved changelog entries back to Unreleased section
- Removed 1.0.0 release entry from CHANGELOG.md
- Configure hatchling to read version from src/sprout/__init__.py
- Update release workflow to only update __init__.py
- Remove version duplication between pyproject.toml and __init__.py
@laysakura laysakura merged commit 1541903 into main Jun 27, 2025
7 checks passed
@laysakura laysakura deleted the release-ci branch June 27, 2025 03:48
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