-
Notifications
You must be signed in to change notification settings - Fork 0
Add release event trigger to support UI-created releases #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This fixes the issue where creating a release through the GitHub UI doesn't trigger the build and asset upload workflow. Now the workflow will trigger on both: 1. Tag pushes (existing behavior) 2. Release creation/publication events (new behavior) The workflow determines the correct tag name based on the event type and handles both cases appropriately. Co-authored-by: esnya <2088693+esnya@users.noreply.github.com>
- Add explicit check for tag push events to avoid ambiguity - Only auto-generate release notes for tag pushes, not for UI-created releases - Add error handling for unexpected event types - Add comments explaining the behavior for different trigger types Co-authored-by: esnya <2088693+esnya@users.noreply.github.com>
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Publish GitHub release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: While Loop Timeout ${{ github.ref_name }} | ||
| generate_release_notes: true | ||
| tag_name: ${{ steps.tag.outputs.tag_name }} | ||
| name: While Loop Timeout ${{ steps.tag.outputs.tag_name }} | ||
| # When triggered by release event, this updates the existing release | ||
| # When triggered by tag push, this creates a new release | ||
| generate_release_notes: ${{ github.event_name != 'release' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow action-gh-release to update existing releases
With the new release trigger, this job now runs after a release has already been created via the UI. softprops/action-gh-release@v2 defaults to creating a release and returns a 422 error if the tag already exists unless allow_updates or update_only is supplied. Because the step omits those inputs, a run triggered by release.created/release.published will fail before assets are uploaded, defeating the purpose of the change. Consider enabling updates when github.event_name == 'release' so the action modifies the existing release instead of attempting to recreate it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
|
@copilot Reviewに対応が必要か考えて必要なら修正 |
自動レビューボット(copilot-pull-request-reviewer)がエラーで実行できなかったため、具体的なレビューコメントはありません。 ワークフローの変更を確認しましたが、問題は見つかりませんでした:
対応が必要な指摘事項はありません。 |
The v0.1.0 tag created via GitHub UI didn't trigger the CI workflow because GitHub Actions ignores
push.tagsfilters for tags created on already-pushed commits.Changes
release: types: [created, published]alongside existingpush.tagstriggerstartsWith(github.ref, 'refs/tags/v')tostartsWith(github.ref, 'refs/tags/v') || github.event_name == 'release'github.ref_name(tag push) orgithub.event.release.tag_name(release event)This maintains backward compatibility while enabling release creation through GitHub UI with automatic artifact attachment.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.