Skip to content

Commit 68bfa4f

Browse files
azuclaude
andcommitted
fix: ensure release failure comments are posted to PR
The comment job was not running when release failed because it checked for 'released == true' which is never set on failure. Changes: - Changed condition from 'needs.release.outputs.released == true' to 'needs.release.result != skipped' - Added default empty value for VERSION in failure comment - Used bash parameter expansion to conditionally add 'v' prefix This ensures PR comments are posted for both success and failure cases. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 187aebe commit 68bfa4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ jobs:
130130
if: |
131131
always() &&
132132
github.event_name == 'pull_request' &&
133-
needs.release.outputs.released == 'true'
133+
needs.release.result != 'skipped'
134134
runs-on: ubuntu-latest
135135
permissions:
136136
pull-requests: write
@@ -158,14 +158,14 @@ jobs:
158158
run: |
159159
gh pr comment "$PR_NUMBER" \
160160
--repo "$REPOSITORY" \
161-
--body "❌ **Release v$VERSION failed**
161+
--body "❌ **Release ${VERSION:+v}$VERSION failed**
162162
163163
Please check the workflow logs for details.
164164
🔗 Workflow run: $SERVER_URL/$REPOSITORY/actions/runs/$RUN_ID"
165165
env:
166166
GH_TOKEN: ${{ github.token }}
167167
PR_NUMBER: ${{ github.event.pull_request.number }}
168-
VERSION: ${{ needs.release.outputs.version }}
168+
VERSION: ${{ needs.release.outputs.version || '' }}
169169
SERVER_URL: ${{ github.server_url }}
170170
REPOSITORY: ${{ github.repository }}
171171
RUN_ID: ${{ github.run_id }}

0 commit comments

Comments
 (0)