Skip to content

Announce releases to Discord (#announcements)#19

Merged
mgoldsborough merged 2 commits into
mainfrom
ci/announce-release-to-discord
Jun 23, 2026
Merged

Announce releases to Discord (#announcements)#19
mgoldsborough merged 2 commits into
mainfrom
ci/announce-release-to-discord

Conversation

@mgoldsborough

Copy link
Copy Markdown
Contributor

Ships Variant A of the release-announcement system: the release pipeline announces itself, CI-native, zero standing infra.

What it does

On release: published, a job formats an announcement mechanically from the GitHub Release (title + lead paragraph, word-boundary capped at 280 chars, + a "Full release notes →" link) and POSTs it to the Discord #announcements webhook. Markdown carries over to the Discord embed (inline code, bold, the title links to the release).

Rendered first post (synapse v0.10.2):

🚀 synapse v0.10.2
Fixes three ui tokens that were theme-blind in dark mode. tokens.bgSubtle, tokens.fgFaint, and tokens.borderStrong reference CSS vars … so they always resolved to…
Full release notes →

Files

  • .github/workflows/announce.yml — triggers on release publish + a manual workflow_dispatch (with a dry_run input). Decoupled from publish.yml so a failure here never affects publishing. permissions: contents: read.
  • .github/scripts/announce-discord.mjs — transport-agnostic formatter + webhook POST. Node builtins only (no deps). Standalone so it can move into a shared action verbatim when we extend to nimblebrain / mpak.

Safe to merge before the webhook exists

With DISCORD_ANNOUNCE_WEBHOOK unset, the job runs, prints the payload it would have sent, and skips the POST — green run, no release impact. So this can land now and start posting the moment the secret is added.

Activation (one-time, manual — needs Discord + repo/org admin)

  1. Discord #announcements → Edit Channel → Integrations → Webhooks → New Webhook → copy URL.
  2. Add it as a secret named DISCORD_ANNOUNCE_WEBHOOK (repo secret for the guinea-pig; promote to an org secret when we roll out to nimblebrain/mpak so all repos share one).
  3. Test without re-releasing: Actions → "Announce release" → Run workflow → tag v0.10.2 (optionally dry_run: true first to preview in the run log).

Next (separate)

  • Extract announce-discord.mjs into a shared action and add the ~15-line caller to nimblebrain (then mpak).
  • Keep CHANGELOG lead paragraphs announcement-tight; the 280-char cap is a safety net, not a license for walls of text.

On `release: published`, format an announcement mechanically from the
GitHub Release (title + lead paragraph, word-boundary capped at 280
chars, + a "Full release notes" link) and POST it to the Discord
#announcements webhook.

- `.github/workflows/announce.yml` — fires on release publish + a manual
  workflow_dispatch (with a dry_run input for testing). Decoupled from
  publish.yml so a failure here never affects publishing.
- `.github/scripts/announce-discord.mjs` — transport-agnostic formatter +
  webhook POST (node builtins only, no deps). Lives as a standalone script
  so it can move into a shared action verbatim when we extend to
  nimblebrain / mpak.

Safe to merge before the webhook exists: with `DISCORD_ANNOUNCE_WEBHOOK`
unset the job runs, prints the payload, and skips the post (green run, no
release impact). Set the secret, then dispatch with tag v0.10.2 to send
the first announcement.
When the release body has no prose lead paragraph (e.g. a CHANGELOG that
leads with '### Fixed', or a manually-cut release using GitHub's
auto-generated notes), the formatter posts generic copy. Emit a
::warning:: so that silent degradation is visible in the run log instead
of shipping a content-free announcement unnoticed — matters most once
this script backs nimblebrain/mpak, whose CHANGELOG formats we don't
control.
@mgoldsborough mgoldsborough added the qa-reviewed QA review completed with no critical issues label Jun 23, 2026
@mgoldsborough mgoldsborough merged commit 9cda175 into main Jun 23, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qa-reviewed QA review completed with no critical issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant