feat: Add automatic semantic versioning workflow

- Create GitHub Actions workflow for automatic version bumping based on PR title prefixes
- Add version bumping script (scripts/bump_version.py) for programmatic updates
- Update PR template with semantic versioning guidelines
- Document versioning workflow in contributing guide
- Integrate with existing Docker build workflow via git tags

This enables automatic version management:
- feat: triggers MINOR version bump
- fix: triggers PATCH version bump
- breaking: triggers MAJOR version bump
- docs/chore/test: no version bump

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Patryk Ciechanski
2025-06-12 08:55:17 +02:00
parent 81ff970189
commit c0ea0e501b
5 changed files with 401 additions and 107 deletions

44
scripts/README.md Normal file
View File

@@ -0,0 +1,44 @@
# Scripts Directory
This directory contains utility scripts for the Gemini MCP Server project.
## bump_version.py
A utility script for semantic version bumping that integrates with the automatic versioning workflow.
### Usage
```bash
python scripts/bump_version.py <major|minor|patch>
```
### Examples
```bash
# Bump patch version (e.g., 3.2.0 → 3.2.1)
python scripts/bump_version.py patch
# Bump minor version (e.g., 3.2.0 → 3.3.0)
python scripts/bump_version.py minor
# Bump major version (e.g., 3.2.0 → 4.0.0)
python scripts/bump_version.py major
```
### Features
- Reads current version from `config.py`
- Applies semantic versioning rules
- Updates both `__version__` and `__updated__` fields
- Preserves file formatting and structure
- Outputs new version for GitHub Actions integration
### Integration
This script is primarily used by the GitHub Actions workflow (`.github/workflows/auto-version.yml`) for automatic version bumping based on PR title prefixes. Manual usage is available for special cases.
### Version Bump Rules
- **Major**: Increments first digit, resets others (3.2.1 → 4.0.0)
- **Minor**: Increments second digit, resets patch (3.2.1 → 3.3.0)
- **Patch**: Increments third digit (3.2.1 → 3.2.2)