Skip to content

Update discord.yml

Update discord.yml #21

Workflow file for this run

name: Send JSON to Discord
on:
push:
branches:
- main
jobs:
send-webhook:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Release Size
id: get_size
run: |
size=$(curl -sI https://github.com/${{ github.repository }}/releases/latest/download/Conquest.zip | grep -i Content-Length | awk '{print $2}')
echo "size=$size" >> $GITHUB_ENV
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Discord Webhook Action
uses: tsickert/discord-webhook@v6.0.0
with:
webhook-url: ${{ secrets.WEBHOOK_URL }}
embed-title: "New Release 🔔"
embed-author-name: by ${{ github.actor }}
embed-author-url: https://github.com/Hyphonic/Conquest
embed-color: 3535423
embed-description: |
### Commit ⚡
Message » `${{ github.event.head_commit.message }}`
Commit SHA » `${{ github.sha }}`
Commit Author » `${{ github.event.head_commit.author.name }}`
### Workflow ☢️
Runner OS » `${{ runner.os }}`
Branch » `${{ env.branch }}`
### Release 📦
Download » [Click here to download](https://github.com/${{ github.repository }}/releases/latest/download/Conquest.zip)`
Size » `${{ env.size }}`
Version » `1.21`