Skip to content

Commit

Permalink
Add prettier notifications to Discord on updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed Jun 23, 2024
1 parent 7fbf3cc commit c44500c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,28 @@ jobs:
env:
CF_API_KEY: ${{ secrets.CF_API_KEY }}
GITHUB_OAUTH: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare for Discord webhook
id: discord-webhook-prep
run: |
echo "ZIP_NAME=$(ls .release/*.zip)" >> $GITHUB_OUTPUT
{
echo 'CHANGELOG<<EOF'
cat .release/*/CHANGELOG.md
echo EOF
} >> "$GITHUB_OUTPUT"
- name: Notify Discord webhook
uses: "tsickert/[email protected]"
with:
webhook-url: "${{secrets.DISCORD_WEBHOOK_URL}}"
content: "[${{ github.repository }}](https://github.com/${{ github.repository }}) New version released: [${{ github.event.release.tag_name }}](https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }})"
username: "NumyAddon"
avatar-url: "https://avatars.githubusercontent.com/u/97855854?s=200&v=4"
filename: ${{ steps.discord-webhook-prep.outputs.ZIP_NAME }}
embed-title: "${{ github.repository }} ${{ github.event.release.tag_name }}"
embed-url: "https://github.com/${{ github.repository }}"
embed-description: "${{ steps.discord-webhook-prep.outputs.CHANGELOG }}"
embed-author-name: "${{ github.event.release.author.login }}"
embed-author-url: "${{ github.event.release.author.html_url }}"
embed-author-icon-url: "${{ github.event.release.author.avatar_url }}"

0 comments on commit c44500c

Please sign in to comment.