Announce GitHub releases in Discord (#5314)

## Summary
- Add a Discord announcement job for published GitHub releases.
- Use `DISCORD_WEBHOOK_RELEASE_CHANNEL_URL` so the target channel can be
configured as a GitHub secret.
- Run the announcement job even if Docker `latest` retagging fails, and
include the retag result in the message.

## Verification
- `ruby -e 'require "yaml";
YAML.load_file(".github/workflows/tag-release.yml")'`
- `git diff --check`

---------

Signed-off-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
Co-authored-by: Zeke Foppa <196249+bfops@users.noreply.github.com>
This commit is contained in:
clockwork-labs-bot
2026-06-14 18:55:03 -04:00
committed by GitHub
parent d93b381719
commit 0306826613
+17
View File
@@ -2,6 +2,8 @@ on:
release:
types: [published]
permissions: {}
jobs:
on-release:
name: Re-tag latest
@@ -21,3 +23,18 @@ jobs:
run: |
VERSION=${GITHUB_REF#refs/*/}
docker buildx imagetools create clockworklabs/spacetimedb:$VERSION --tag clockworklabs/spacetimedb:latest
announce-release:
name: Announce GitHub release
runs-on: ubuntu-latest
needs: on-release
if: always()
steps:
- name: Send Discord notification
run: |
set -euo pipefail
message="SpacetimeDB GitHub release published: [${{ github.event.release.name }}](<${{ github.event.release.html_url }}>)"
data="$(jq --null-input --arg msg "$message" '.content=$msg')"
curl -X POST -H 'Content-Type: application/json' -d "$data" "${{ secrets.DISCORD_WEBHOOK_RELEASE_ANNOUNCE_URL }}"