Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 2, 2025

Overview

Implements a comprehensive automated versioning system for the repository that follows semantic versioning with the beta-vX.Y.Z format as requested. The system automatically analyzes commit messages, updates version files, creates tags, and manages releases without any manual intervention.

✨ Features Added

📄 VERSION File

  • Created /VERSION file with initial value beta-v0.1.1
  • Serves as the single source of truth for repository versioning

🤖 GitHub Actions Workflow

  • File: .github/workflows/bump-version.yml
  • Triggers: Automatic on push to main branch + manual dispatch
  • Capabilities:
    • Analyzes commit messages using Conventional Commits
    • Calculates appropriate version bumps (major/minor/patch)
    • Updates VERSION file and ALL .user.js files recursively
    • Creates automatic commits with proper skip conditions
    • Generates git tags following beta-vX.Y.Z pattern
    • Creates GitHub releases (marked as prerelease)

📊 Semantic Versioning Logic

Commit Type Version Bump Example
feat: Minor beta-v0.1.1beta-v0.2.0
fix: Patch beta-v0.1.1beta-v0.1.2
BREAKING CHANGE / !: Major beta-v0.1.1beta-v1.0.0

🔄 Automatic Updates

  • Recursive: Finds and updates ALL .user.js files in repository and subfolders
  • Format: Updates @version field to match beta-vX.Y.Z pattern
  • Existing Files: Updated current userscript from 0.2-beta to beta-v0.1.1

📚 Documentation

  • VERSIONING.md: Complete guide on how the system works
  • Updated README.md: Added version badges and automation information
  • Examples: Commit message formats and troubleshooting

🛡️ Safety Features

  • Loop Prevention: Uses [skip ci] and [version bump] markers to prevent infinite workflows
  • Conditional Execution: Only runs when actual version-bumping commits are detected
  • Manual Override: Supports [skip ci] in commit messages to bypass automation
  • Manual Trigger: Can be triggered manually from GitHub Actions interface

🧪 Testing

  • ✅ Version extraction and bump logic validated locally
  • ✅ Commit message parsing tested with multiple scenarios
  • ✅ Recursive file discovery confirmed working
  • ✅ YAML syntax validated and corrected
  • ✅ All workflow steps verified

📝 Usage Examples

# Minor version bump (new feature)
git commit -m "feat: add support for new government site"

# Patch version bump (bug fix)  
git commit -m "fix: resolve checkbox detection issue"

# Major version bump (breaking change)
git commit -m "feat!: completely redesign userscript architecture"

# Skip automation (documentation updates)
git commit -m "docs: update README [skip ci]"

🎯 Requirements Fulfilled

  • Arquivo VERSION (inicial: beta-v0.1.1) ✅
  • Workflow GitHub Actions (.github/workflows/bump-version.yml) ✅
  • Atualizar arquivo VERSION e @Version de todos os .user.js ✅
  • Commit e criação de tag automática seguindo beta-vX.Y.Z ✅
  • Calcular versão pelo tipo do commit (feat, fix, BREAKING) ✅
  • Processo automático sem interação manual ✅

The system is now fully operational and will begin automatic versioning on the next push to main branch with conventional commit messages.


💡 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.

@nelisjunior nelisjunior marked this pull request as ready for review July 2, 2025 23:48
@nelisjunior nelisjunior merged commit 693c048 into main Jul 2, 2025
1 check passed
@nelisjunior nelisjunior deleted the copilot/fix-843d7625-cbc1-41c3-aa7c-a7a9803caeae branch July 2, 2025 23:49
@nelisjunior nelisjunior requested a review from Copilot July 2, 2025 23:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Copilot AI restored the copilot/fix-843d7625-cbc1-41c3-aa7c-a7a9803caeae branch July 2, 2025 23:50
Copilot AI changed the title [WIP] Automação de versionamento automático, atualização dos userscripts e criação de tag feat: add automated versioning system with GitHub Actions workflow Jul 2, 2025
Copilot AI requested a review from nelisjunior July 2, 2025 23:57
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