Skip to content

Conversation

aaronsteers
Copy link
Owner

@aaronsteers aaronsteers commented Aug 14, 2025

feat: implement complete automated release workflow

Summary

This PR implements a two-workflow automated release management system using the release-drafter pattern, following PyAirbyte's proven approach but simplified for this action repository. The implementation replaces the original single workflow approach with a more robust system:

Workflow 1: Release Drafter - Automatically creates and updates release drafts when PRs are merged to main
Workflow 2: Major Tag Management - Automatically updates major version tags (v1, v2, etc.) when releases are published

Key Changes:

  • Added .github/release-drafter.yml configuration with semantic versioning support and automatic change categorization
  • Added .github/workflows/release-drafter.yml that triggers on main branch pushes to update release drafts
  • Modified .github/workflows/update-major-tags.yml to trigger on release.published events instead of direct tag pushes
  • Follows PyAirbyte's patterns with appropriate permissions scoping

Review & Testing Checklist for Human

  • Verify third-party actions are trustworthy: Check that release-drafter/release-drafter@v6 and nowactions/update-majorver@v1 are from reputable sources and haven't been compromised
  • Test end-to-end workflow: Merge this PR to main, verify a release draft is created, then publish the release and confirm major tags are updated correctly
  • Validate trigger conditions: Ensure release.published event properly triggers the major tag workflow and doesn't trigger on drafts or pre-releases
  • Review permissions scope: Confirm contents: write and pull-requests: read are the minimum required permissions for both workflows
  • Test release-drafter configuration: Verify the YAML configuration correctly categorizes changes and generates proper semantic versions

Recommended Test Plan:

  1. Merge this PR to main and observe that a release draft is automatically created
  2. Make another small change, merge it, and verify the release draft is updated with the new changes
  3. Publish the release draft and confirm that the major version tag (v1) is automatically moved to point to the new release
  4. Verify existing repository functionality remains unaffected

Diagram

%%{ init : { "theme" : "default" }}%%
graph TD
    subgraph Repository["aaronsteers/poe-command-processor"]
        PRMerge["PR Merge<br/>to main"]
        
        subgraph Workflows[".github/workflows/"]
            ReleaseDrafter[".../release-drafter.yml"]:::major-edit
            MajorTags[".../update-major-tags.yml"]:::major-edit
            ExistingWorkflow1[".../slash-command-dispatch.yml"]:::context
            ExistingWorkflow2[".../tests-command.yml"]:::context
        end
        
        subgraph Config[".github/"]
            ReleaseDrafterConfig["release-drafter.yml"]:::major-edit
        end
        
        subgraph GitHubUI["GitHub UI"]
            ReleaseDraft["Release Draft"]:::context
            PublishedRelease["Published Release"]:::context
        end
        
        subgraph Tags["Git Tags"]
            SemanticTags["v1.0.0, v1.1.0, v1.2.0, v1.3.0"]:::context
            MajorTagsNode["v1, v2, etc."]:::context
        end
        
        ThirdPartyAction1["release-drafter/release-drafter@v6"]:::context
        ThirdPartyAction2["nowactions/update-majorver@v1"]:::context
    end
    
    PRMerge --> ReleaseDrafter
    ReleaseDrafter --> ThirdPartyAction1
    ThirdPartyAction1 --> ReleaseDraft
    ReleaseDraft --> PublishedRelease
    PublishedRelease --> MajorTags
    MajorTags --> ThirdPartyAction2
    ThirdPartyAction2 --> MajorTagsNode
    ReleaseDrafterConfig --> ReleaseDrafter
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit
        L3[Context/No Edit]:::context
    end

classDef major-edit fill:#90EE90
classDef minor-edit fill:#87CEEB
classDef context fill:#FFFFFF
Loading

Notes

  • This change was requested by @aaronsteers to implement automated release management using the release-drafter pattern
  • The implementation follows PyAirbyte's proven patterns but is simplified since no Python package publishing is needed
  • Session URL: https://app.devin.ai/sessions/e708ac162b084dc3935cd7c3aa7d5d80
  • The workflow creates a complete automated release pipeline: PR merges → release drafts → published releases → updated major tags
  • The fetch-depth: 0 in the major tag workflow ensures access to full git history for proper tag management
  • This replaces the need for manual maintenance of major version tags/branches like the existing origin/v1 branch

- Add workflow to automatically update major version tags (v1, v2, etc.) when semantic version tags are pushed
- Uses nowactions/update-majorver@v1 action to move major tags to latest patch releases
- Triggers on semantic version tag pushes (v*.*.* pattern)
- Includes proper permissions for tag management operations

Requested by @aaronsteers

Co-Authored-By: AJ Steers <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings August 14, 2025 22:54
Copy link
Contributor

Original prompt from AJ Steers
@Devin - can you see the repo and do you have write access to my aaronsteers/poe-command-processor repo? I assume you haven't cloned it yet but I think you have access.

I want you to create a PR that automatically manages major release tags using this snippet I just found:

      # Update the major tag (e.g., move v1 to point at v1.2.3)
      - name: Update major tag
        uses: nowactions/update-majorver@v1
        # Updates v1/v2… when a SemVer tag is pushed. :contentReference[oaicite:8]{index=8}

Copy link
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Contributor

@Copilot 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.

Pull Request Overview

This PR introduces automation for major version tag management by adding a GitHub Actions workflow that automatically updates major version tags (e.g., v1) when new semantic version tags (e.g., v1.2.3) are pushed to the repository.

  • Adds automated major version tag management workflow
  • Configures trigger for semantic version tag pushes with pattern v[0-9]+.[0-9]+.[0-9]+
  • Uses third-party action nowactions/update-majorver@v1 to handle tag updates

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

devin-ai-integration bot and others added 2 commits August 14, 2025 22:55
- Change trigger pattern from 'v[0-9]+.[0-9]+.[0-9]+' to 'v[0-9]+\.[0-9]+\.[0-9]+'
- Ensures the workflow only triggers on proper semantic version tags
- Addresses Copilot feedback on PR #14

Co-Authored-By: AJ Steers <[email protected]>
- Add release-drafter workflow that creates/updates release drafts on main merges
- Add release-drafter.yml configuration with semantic versioning support
- Modify major tag management to trigger on release publication events instead of direct tag pushes
- Follow PyAirbyte's proven patterns but simplified (no Python package publishing)

This creates a complete automated release workflow:
1. PRs merged to main → Release draft updated automatically
2. Maintainer publishes the release → Major version tags updated automatically

Requested by @aaronsteers

Co-Authored-By: AJ Steers <[email protected]>
@aaronsteers aaronsteers merged commit 3c2582b into main Aug 14, 2025
@aaronsteers aaronsteers deleted the devin/1755211923-add-major-tag-management branch August 14, 2025 23:09
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.

1 participant