Skip to content

Conversation

aaronsteers
Copy link
Owner

@aaronsteers aaronsteers commented Aug 14, 2025

Fix GitHub Actions workflow failure in major version tag management

Summary

This PR fixes the GitHub Actions workflow failure that occurred when the major version tag management workflow was triggered by release.published events. The root cause was that the nowactions/update-majorver@v1 action expects the GitHub context from tag push events, not release publication events.

Key Changes:

  • Changed trigger from on.release.types: [published] to on.push.tags: ['v*.*.*']
  • Reverted back to using the original nowactions/update-majorver@v1 action
  • Simplified approach: trigger on semantic version tag pushes instead of release events

Workflow Behavior Change:

  • Before: Major tags updated when releases are published
  • After: Major tags updated when semantic version tags (v*..) are pushed

This maintains the two-workflow approach but changes the timing of major tag updates.

Review & Testing Checklist for Human

  • Verify workflow timing aligns with release strategy - Major tags now update on tag push rather than release publication. Confirm this matches your intended release workflow.
  • Test end-to-end workflow - Create a test semantic version tag (e.g., v1.4.0) and verify that the major tag (e.g., v1) is automatically updated to point to the new tag.
  • Validate tag pattern - Confirm the pattern v*.*.* matches your repository's existing tag format (currently using tags like v1.3.1).

Recommended Test Plan:

  1. Merge this PR
  2. Create and push a new semantic version tag: git tag v1.4.0 && git push origin v1.4.0
  3. Verify the workflow runs successfully and updates the v1 tag to point to v1.4.0
  4. Test that the release-drafter workflow still works by merging a PR to main

Diagram

%%{ init : { "theme" : "default" }}%%
graph TB
    subgraph "Release Management Workflows"
        A["main branch<br/>merges"]
        B["tag pushes<br/>(v*.*.*)"]
        C[".github/workflows/<br/>release-drafter.yml"]:::context
        D[".github/workflows/<br/>update-major-tags.yml"]:::major-edit
        E["nowactions/<br/>update-majorver@v1"]:::context
        F["Draft releases<br/>created/updated"]
        G["Major tags<br/>(v1, v2) updated"]
    end
    
    subgraph Legend
        L1[Major Edit]:::major-edit
        L2[Minor Edit]:::minor-edit
        L3[Context/No Edit]:::context
    end
    
    A --> C
    B --> D
    C --> F
    D --> E
    E --> G

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

Notes

  • Root Cause: The nowactions/update-majorver@v1 action was designed to work with tag push events (github.ref context) but was being triggered by release publication events (github.event.release context), causing undefined property access errors.
  • Alternative Considered: I initially implemented a custom bash script solution to work with release events, but @aaronsteers correctly suggested the simpler approach of using tag push triggers.
  • Session Details: Requested by @aaronsteers - Devin session

Risk Assessment: 🟡 Medium - The workflow behavior change (tag push vs release publication timing) needs verification to ensure it aligns with the intended release management strategy.

- Change trigger from 'on.release.types: [published]' to 'on.push.tags: [v*.*.*]'
- Revert back to using nowactions/update-majorver@v1 action instead of custom solution
- This fixes the workflow failure: 'Cannot read properties of undefined (reading 'id')'
- Root cause: nowactions/update-majorver@v1 expects tag push context, not release context
- Simpler approach suggested by @aaronsteers - use tag pushes instead of release events

Requested by @aaronsteers

Co-Authored-By: AJ Steers <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings August 14, 2025 23:24
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 fixes a GitHub Actions workflow failure by changing the trigger mechanism for the major version tag management workflow. The issue was that the nowactions/update-majorver@v1 action expects GitHub context from tag push events, not release publication events.

  • Changed workflow trigger from release.published events to push events on semantic version tags (v*.*.*)
  • Simplified the approach by using the action as originally intended rather than implementing a custom solution
  • Updated timing so major version tags are now updated immediately when semantic version tags are pushed

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

@aaronsteers aaronsteers merged commit ab193b7 into main Aug 14, 2025
@aaronsteers aaronsteers deleted the devin/1755213131-fix-release-workflow-failure branch August 14, 2025 23:31
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