From a0af41c5aac3a9138b9133b0cefc42e57a5e6c5c Mon Sep 17 00:00:00 2001 From: Valentin Maerten Date: Tue, 18 Aug 2026 17:56:34 +0200 Subject: [PATCH] ci: announce releases on discord --- .github/workflows/announce.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/announce.yml diff --git a/.github/workflows/announce.yml b/.github/workflows/announce.yml new file mode 100644 index 00000000..a67f7596 --- /dev/null +++ b/.github/workflows/announce.yml @@ -0,0 +1,33 @@ +name: announce + +on: + release: + types: [published] + +permissions: {} + +jobs: + discord: + # The nightly release is published under the "nightly" tag, not a version tag. + if: startsWith(github.event.release.tag_name, 'v') + runs-on: ubuntu-latest + steps: + - name: Announce on Discord + env: + WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + TAG: ${{ github.event.release.tag_name }} + RELEASE_URL: ${{ github.event.release.html_url }} + run: | + jq -n \ + --arg title "Task $TAG" \ + --arg url "$RELEASE_URL" \ + '{embeds: [{ + title: $title, + url: $url, + description: "A new release is available! Check the changelog for details.", + color: 4434850 + }]}' \ + | curl --silent --show-error --fail-with-body \ + --header "Content-Type: application/json" \ + --data @- \ + "$WEBHOOK_URL"