From f95ed5880f1e99230b81169cb803a572fe2346ba Mon Sep 17 00:00:00 2001 From: Hyphonical <69310714+Hyphonic@users.noreply.github.com> Date: Sat, 14 Dec 2024 14:18:18 +0100 Subject: [PATCH] Update discord.yml --- .github/workflows/discord.yml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 6118aad..92231d4 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -10,21 +10,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - name: Get Release Size + id: get_size + run: | + file_url="https://example.com/direct-download-url" + size=$(curl -sI $file_url | grep -i Content-Length | awk '{print $2}') + echo "size=$size" >> $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-description: | ### Commit โšก Message ยป `${{ github.event.head_commit.message }}` - Commit SHA ยป `${{ github.sha }}` - + Commit Author ยป `${{ github.event.head_commit.author.name }}` ### Workflow โ˜ข๏ธ - Branch ยป `${{ github.ref }}` - + Runtime (minutes) ยป `${{ github.event.workflow_run.run_duration_ms / 60000 }}` + Runner OS ยป `${{ runner.os }}` ### Release ๐Ÿ“ฆ - Download ยป `` - embed-footer-text: '[Visit_Repository](https://github.com/Hyphonic/Conquest)' + Download ยป `https://github.com/${{ github.repository }}/releases/latest/download/Conquest.zip` + Size ยป `${{ env.size }}` + Version ยป `1.21`