feat: automated versioning based on conventional commits - #241
Conversation
- 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
|
@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 Three options:
Potential recommendation: Option C — squash merge gives a clean 1:1 mapping between PRs and commits on |
|
Hi Dario, I don't have a strong opinion here but I'd lean towards option A (keep as-is). Most of us will have the pre-commit hook installed, external comitters can be asked to add a confirming commit message in a PR review. I reviewed the changes, LGTM (looks good to me). Passing a github token to 3rd party actions makes me worry about supply-chain attacks. If you were paranoid you could consider using hashes rather than versions: |
Closes #239
This feature adds automated semantic versioning to the sysdiagnose project. When commits are pushed to the
mainbranch (after passing branch protection checks), the system analyses conventional commit messages, determines the appropriate SemVer bump (major, minor, patch), updatespyproject.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.ymland serves as the sole release mechanism for the project.