Skip to content

feat: automated versioning based on conventional commits - #241

Draft
dario-br wants to merge 2 commits into
mainfrom
feat/automated-versioning
Draft

feat: automated versioning based on conventional commits#241
dario-br wants to merge 2 commits into
mainfrom
feat/automated-versioning

Conversation

@dario-br

@dario-br dario-br commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Closes #239

This feature adds automated semantic versioning to the sysdiagnose project. When commits are pushed to the main branch (after passing branch protection checks), the system analyses conventional commit messages, determines the appropriate SemVer bump (major, minor, patch), updates pyproject.toml, creates a Git tag, generates a changelog with author attribution using git-cliff, and publishes a GitHub Release. The Version_Workflow is implemented as .github/workflows/release.yml and serves as the sole release mechanism for the project.

- Enable Dependabot to check for GitHub Actions updates weekly
- Replace Docker build workflow with Python Semantic Release for automated versioning
- Add git-cliff configuration for structured changelog generation
- Integrate GitHub Release notes automation with git-cliff output
- Update workflow names for clarity (release.yml, unittest.yml)
- Add pre-commit to dev dependencies for code quality enforcement
- Configure semantic versioning with conventional commits parsing
- Set up automatic changelog grouping by commit type (features, fixes, docs, etc.)
- Add .pre-commit-config.yaml with ruff and conventional-pre-commit hooks
- Configure ruff-check with auto-fix and ruff-format for consistent code style
- Enforce Conventional Commits format via pre-commit hook on commit messages
- Update CONTRIBUTING.md with pre-commit installation instructions
- Add comprehensive Commit Messages section documenting conventional commit types
- Document automated release workflow and version bumping strategy
- Clarify that version updates and tags are handled automatically by CI
- Provide commit message examples and breaking change documentation
@dario-br
dario-br requested a review from willmoffat August 5, 2026 11:29
@dario-br

dario-br commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@willmoffat can you take a look to this decision point?

Decision needed: handling non-conventional commits

The pre-commit hook enforces conventional commit format locally, but it's opt-in. Non-conventional commits can still reach main if a contributor skips setup. Currently, python-semantic-release ignores them — no release is created until a properly formatted commit follows.

Three options:

Option Approach Trade-off
A. Keep as-is Non-conventional commits silently ignored Simple; some changes may ship unversioned
B. CI check on commits Add amannn/action-semantic-pull-request to validate commit messages in PRs Catches all cases; slightly more CI config
C. Squash merge + PR title validation Restrict to squash merges only, validate PR title with amannn/action-semantic-pull-request, add as required status check Only the PR title matters — contributors can commit freely during development. Downside: loses individual commit history on main

Potential recommendation: Option C — squash merge gives a clean 1:1 mapping between PRs and commits on main, and validating just the PR title is simpler for contributors. Can be addressed in a follow-up PR.

@dario-br dario-br self-assigned this Aug 11, 2026
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.

feat: Add automated semantic versioning with conventional commits

1 participant