Skip to content

Commit ef25c62

Browse files
committed
fix: update notify
1 parent 0b6d7ad commit ef25c62

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

.github/workflows/cmake-multiple-platform.yml

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -415,26 +415,31 @@ jobs:
415415
runs-on: ubuntu-latest
416416
steps:
417417
- name: Send Discord Notification
418-
if: ${{ success() }}
419-
env:
420-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
421-
uses: Ilshidur/action-discord@0.3.2
418+
if: ${{ needs.build.result == 'success' && needs.package.result == 'success' && needs.repository.result == 'success' }}
419+
uses: tsickert/discord-webhook@v7.0.0
422420
with:
423-
args: |
424-
🎉 **New Release: ${{ env.PROJECT_NAME }} ${{ needs.setup.outputs.tag_name }}**
421+
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
422+
embed-description: |
423+
## <:plugin_creator:1336096248515657880> New Release: ${{ env.PROJECT_NAME }} ${{ needs.setup.outputs.tag_name }}
424+
425+
### <:link:1342486300653129811> Downloads
426+
-# <:curved_arrow_right:1342544469148565545> [${{ needs.setup.outputs.tag_name }}](${{ needs.package.outputs.url }})
425427
426-
📦 **Downloads:** [${{ needs.setup.outputs.tag_name }}](${{ needs.package.outputs.url }})
427-
🐍 **Conda Channel:** https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
428+
### 🐍 Conda Channel
429+
-# <:curved_arrow_right:1342544469148565545> https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
428430
429-
Install via conda:
431+
<:blank:1335697913464098908>
432+
**Install via conda:**
430433
```bash
431434
conda install -c https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/ ${{ env.PROJECT_NAME }}
432435
```
433-
436+
embed-color: 955135
437+
434438
- name: Send Failure Notification
435-
if: ${{ failure() }}
436-
env:
437-
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
438-
uses: Ilshidur/action-discord@0.3.2
439+
if: ${{ needs.build.result == 'failure' || needs.package.result == 'failure' || needs.repository.result == 'failure' }}
440+
uses: tsickert/discord-webhook@v7.0.0
439441
with:
440-
args: "⚠️ Release workflow failed for ${{ env.PROJECT_NAME }} ${{ needs.setup.outputs.tag_name }}"
442+
webhook-url: ${{ secrets.DISCORD_WEBHOOK }}
443+
embed-description: |
444+
## <a:cry:1247121995997384738> Release workflow failed for ${{ env.PROJECT_NAME }} ${{ needs.setup.outputs.tag_name }}
445+
embed-color: 16221227

0 commit comments

Comments
 (0)