Fix Github Actions Workflow#3
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies the GitHub Actions workflow to change when and how releases are created. The workflow now attempts to create releases both for tagged versions and for every push to the main branch, rather than only for tagged versions.
- Changed the release creation condition from tag-only to include both main branch pushes and tagged pushes
- Added dynamic tag_name generation that creates tags automatically for non-tagged pushes
- Replaced static release body with auto-generated release notes
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Create Release (Tag Only) | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| - name: Create Release | ||
| if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) |
There was a problem hiding this comment.
The condition now allows creating releases on pushes to the main branch, which will attempt to create a release every time code is pushed to main. However, when pushing to main (non-tag push), the workflow will try to create a release with an auto-generated tag name, but if that tag already exists from a previous push, this will fail. Additionally, this can result in unintended releases being created for every commit to main rather than only for tagged versions.
Consider whether releases should truly be created on every push to main, or if releases should only be created when tags are pushed. If the intent is to create releases only for tags, the original condition 'startsWith(github.ref, 'refs/tags/v')' was more appropriate.
No description provided.