-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add semantic versioning workflow with conventional commits and fix wiki history preservation #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add semantic versioning workflow with conventional commits and fix wiki history preservation #8
Conversation
Co-authored-by: ChingEnLin <[email protected]>
Co-authored-by: ChingEnLin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements automated semantic versioning for QueryPal using conventional commits to automatically calculate version numbers when the production branch is updated.
- Adds semantic-release workflow with GitHub Actions integration
- Implements comprehensive documentation for conventional commit standards and versioning process
- Establishes automated changelog management and wiki updates for release tracking
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/semantic-release.yml |
Complete workflow implementation for automated versioning, release creation, and wiki updates |
docs/SEMANTIC_VERSIONING.md |
Detailed documentation covering conventional commit standards, version bump rules, and workflow processes |
README.md |
Added versioning section with links to semantic versioning documentation |
CHANGELOG.md |
Initial changelog structure following Keep a Changelog format |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if [ -f "Releases.md.bak" ]; then | ||
| # Extract previous releases section if it exists | ||
| grep -A 1000 "### Previous Releases" "Releases.md.bak" | tail -n +2 >> "Releases.md" 2>/dev/null || true | ||
| fi |
Copilot
AI
Aug 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic tries to read from 'Releases.md.bak' before it's created. Since the backup is only created at line 242, this condition will always be false on first run, potentially losing previous releases data if the file already exists.
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| # Create or update the Releases page | ||
| cat > "Releases.md" << EOF |
Copilot
AI
Aug 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wiki page creation overwrites the entire 'Releases.md' file, potentially losing existing release history. Consider reading the existing file first and preserving the 'Previous Releases' section before recreating it.
|
@copilot fix the wiki page creation overwriting entire releases.md file issue, check the comments |
- Read existing Releases.md before overwriting to preserve all history - Convert current "Latest Release" to "Previous Release" format - Remove faulty backup approach that only kept one previous release - Ensure cumulative release history is maintained across all updates Co-authored-by: ChingEnLin <[email protected]>
Fixed the wiki page creation issue. The problem was the workflow was completely overwriting the Releases.md file each time and relying on a faulty backup system that only preserved the immediate previous release. The fix (commit 85c8e31) now:
This ensures no release history is lost when new versions are published. |
|
🎉 This PR is included in version 2.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This PR implements automated semantic versioning for QueryPal using conventional commits, addressing the requirement to calculate software version numbers automatically when the production branch is updated.
Overview
The implementation provides a complete semantic versioning solution that:
vX.Y.Zformat starting from v2.0.0Key Features
🤖 Automated Version Calculation
feat!:,BREAKING CHANGE:)feat:)fix:,docs:, etc.)🏷️ Smart Tag Handling
v2.0tag by creating a compatiblev2.0.0semantic version📚 Documentation & Wiki Updates
CHANGELOG.mdwith structured release history🔄 Workflow Integration
productionbranch pushes (same as deployment workflow)Wiki History Preservation Fix
A critical fix ensures the wiki
Releases.mdfile properly maintains historical releases. The original implementation had a flawed backup system that:The fix ensures:
Implementation Details
Files Added/Modified
New Workflow:
.github/workflows/semantic-release.ymlDocumentation:
docs/SEMANTIC_VERSIONING.md- Comprehensive guide for developersCHANGELOG.md- Initial changelog structureREADME.md- Added versioning section with links to documentationConventional Commit Examples
Testing & Validation
Expected Behavior
Based on current commits since
v2.0, the next release will be v2.1.0 due to thefeat:commits in this PR. Future releases will be automatically calculated based on conventional commit types.The workflow integrates perfectly with the existing deployment process - when code is pushed to
production, it will:This provides complete traceability from commits → versions → deployments → release documentation with full historical context maintained.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.