Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

GitHub releases were not being created despite tags being pushed successfully. Tags v0.0.6, v0.0.7 existed without corresponding releases.

Root Cause

The auto-tag job pushed tags using GITHUB_TOKEN, which doesn't trigger subsequent workflow runs. The release job expected to run on tag push events, but never executed.

Changes

Consolidated tag creation and release into single job:

  • Renamed auto-tagauto-tag-and-release
  • Added release creation step immediately after tag push
  • Made release conditional on successful tag creation (if: steps.create_tag.outputs.tag_created == 'true')

Improved tag existence handling:

  • Check local tags with git tag -l (not git rev-parse which matches any ref)
  • Check remote tags before attempting creation
  • Set tag_created output flag to control downstream steps

Version upgrades:

  • softprops/action-gh-release@v1v2

Workflow

auto-tag-and-release:
  steps:
    - name: Create and push tag
      id: create_tag
      run: |
        # Skip if tag exists locally/remotely
        if git tag -l "$VERSION" | grep -q .; then
          echo "tag_created=false" >> $GITHUB_OUTPUT
          exit 0
        fi
        
        git tag -a $VERSION -m "Release $VERSION"
        git push origin $VERSION
        echo "tag_created=true" >> $GITHUB_OUTPUT
    
    - name: Create GitHub Release
      if: steps.create_tag.outputs.tag_created == 'true'
      uses: softprops/action-gh-release@v2
Original prompt

This section details on the original issue you should resolve

<issue_title>automatically creating a new release isn't working</issue_title>
<issue_description>creation of a new github release is being skipped. But the releases are being tagged - and it appears that they are being tagged multiple times. e.g. we were at v0.0.5, I tried to manually push to 0.0.6 but the yag was already in place, I tried to 0.0.7 this was also in place - I had to uplift to 0.0.8</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix issue with automatic release creation process Fix automatic release creation by creating releases in same workflow run as tags Oct 27, 2025
Copilot AI requested a review from chrisw-dev October 27, 2025 07:46
Copilot finished work on behalf of chrisw-dev October 27, 2025 07:46
@chrisw-dev chrisw-dev marked this pull request as ready for review October 27, 2025 07:50
@chrisw-dev chrisw-dev merged commit fa1f22a into main Oct 27, 2025
2 checks passed
@chrisw-dev chrisw-dev deleted the copilot/fix-automatic-release-creation branch October 27, 2025 07:50
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.

automatically creating a new release isn't working

2 participants