Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 3, 2025

🎯 Overview

This PR implements a standardized release workflow that automatically creates GitHub releases based on tag patterns, addressing the need for proper release management in the repository.

✨ Features

🚀 New Release Workflow (.github/workflows/release.yml)

  • Normal Releases: Tags starting with v* (e.g., v1.0.0, v2.1.3) → Published as stable releases
  • Pre-releases: Tags containing beta or alpha → Published as pre-releases
  • Action: Uses softprops/action-gh-release@v2 for modern GitHub release creation
  • Assets: Automatically includes UserScript files and VERSION file as release assets
  • Changelog: Auto-generates release notes from commit history since last tag

📋 Tag Pattern Examples

# Normal releases (stable)
git tag v1.0.0 && git push origin v1.0.0

# Pre-releases (testing)
git tag v1.0.0-beta.1 && git push origin v1.0.0-beta.1
git tag beta-v0.1.0 && git push origin beta-v0.1.0
git tag alpha-v0.2.0 && git push origin alpha-v0.2.0

📚 Updated Documentation

Added comprehensive development workflow section to README.md:

  • Development Flow: dev branch → Pull Request → main branch → tag → release
  • Tag Standards: Clear guidelines for release vs pre-release tagging
  • Integration: Works seamlessly with existing automatic versioning system

🔧 Workflow Logic

# Detects release type based on tag pattern
if [[ "$TAG_NAME" == *"beta"* ]] || [[ "$TAG_NAME" == *"alpha"* ]]; then
  # Pre-release
elif [[ "$TAG_NAME" == v* ]]; then
  # Normal release
else
  # Default to pre-release for safety
fi

🛡️ Safety & Maintenance

  • Comprehensive Comments: Detailed maintenance instructions throughout the workflow
  • Backward Compatible: Existing bump-version.yml workflow remains unchanged
  • Safe Defaults: Unknown tag patterns default to pre-release
  • Validation: YAML syntax and logic thoroughly tested

📖 Usage Instructions

  1. Development: Work on dev branch
  2. Integration: Merge to main via Pull Request only
  3. Release: Create appropriate tag from main branch:
    • v1.0.0 for stable release
    • v1.0.0-beta.1 for pre-release

The workflow will automatically:

  • ✅ Detect release type from tag pattern
  • ✅ Generate changelog from commits
  • ✅ Create GitHub release with proper pre-release flag
  • ✅ Attach UserScript files as downloadable assets

🔄 Integration

This PR complements the existing automatic versioning system:

  • Existing: bump-version.yml handles automatic beta versioning on commits
  • New: release.yml handles manual releases via tags
  • Result: Complete automation for both development and release workflows

No existing functionality is modified or removed.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@nelisjunior nelisjunior marked this pull request as ready for review July 3, 2025 13:01
@nelisjunior nelisjunior merged commit 8e481eb into dev Jul 3, 2025
1 check passed
@nelisjunior nelisjunior deleted the copilot/fix-25c8e83c-79e9-44ff-acd0-564196881406 branch July 3, 2025 13:02
Copilot AI restored the copilot/fix-25c8e83c-79e9-44ff-acd0-564196881406 branch July 3, 2025 13:03
Copilot AI changed the title [WIP] Padronizar workflow de releases e documentar fluxo de branches/releases feat: Add standardized release workflow for v* tags and beta/alpha pre-releases Jul 3, 2025
Copilot AI requested a review from nelisjunior July 3, 2025 13:08
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