Skip to content

ci: announce SDK releases on Discord - #52

Merged
bendersej merged 2 commits into
mainfrom
P074-02-discord-release-notes
Sep 28, 2026
Merged

bendersej merged 2 commits into
mainfrom
P074-02-discord-release-notes

Conversation

@bendersej

Copy link
Copy Markdown
Member

Background

SDK releases are announced in the SimplePDF Discord. Changesets already writes each package's CHANGELOG and GitHub release; this posts the same notes to the releases channel when a release goes out.

Changes

  • scripts/announce-release.mjs posts one message per published package with changes, built from the section changesets wrote into its CHANGELOG:
    • notes grouped under Breaking changes / What's new / Fixes and improvements, without commit hashes or "Updated dependencies" lines
    • a section with a single entry reads as a paragraph
    • a Get started field: the script tag for packages with an unpkg build, plus npm install
    • Release notes · npm · Docs links
    • brand blue, red when the release has breaking changes
    • mentions disabled
  • A release that only updated dependencies gets no message of its own: it is listed under "Also released" in the first one.
  • Notes over Discord's limit are cut at an entry boundary, in order, with a link to the full release notes.
  • The release workflow runs it after changesets/action, only when something was published, with the DISCORD_RELEASES_WEBHOOK_URL secret.
  • Without the secret, or with DRY_RUN=1, it prints the messages instead of posting them.
  • Exit codes: 2 invalid published packages, 3 missing CHANGELOG section, 4 Discord rejected a message.
  • node:test suite (5 tests, no new dependency), run by a new Scripts workflow on PRs touching scripts/.

Notes

  • Dry-run against the real changeset version output for the upcoming @simplepdf/web-embed-pdf 1.9.0 builds a valid message (1,232-character description).
  • Merge before the next version PR so that release is announced.

@bendersej
bendersej merged commit 5298014 into main Sep 28, 2026
3 checks passed
@bendersej
bendersej deleted the P074-02-discord-release-notes branch September 28, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant