feat: add Discord notification for new releases in GitHub Actions wor…#118
Merged
graycyrus merged 1 commit intoMar 31, 2026
Conversation
…kflow - Introduced a new job `notify-discord` to send notifications to a Discord channel upon successful release publication. - The notification includes release details such as title, version, and assets, formatted for clarity. - Added error handling for missing webhook URL and invalid release IDs to ensure robustness.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
notify-discordjob to the release workflow that posts a rich embed to a Discord channel after every successful GitHub release publication. The job is terminal (nothing depends on it), guarded bycontinue-on-error: true, and skips gracefully when the webhook secret is absent.Summary
notify-discordas the final job in.github/workflows/release.yml, gated onpublish-releaseandbuild-artifactsboth succeeding.core.warning, notcore.setFailed) whenDISCORD_RELEASE_WEBHOOK_URLis not configured or the release ID is invalid.continue-on-error: trueensures a Discord outage or misconfiguration never blocks or rolls back a published release.Problem
Releases were published to GitHub without any automated community notification. Contributors and users had no automated way to learn about new builds without watching the GitHub releases page. The team wanted Discord pings on publish without risking the release pipeline if the webhook is misconfigured or Discord is unavailable.
Relevant file touched:
.github/workflows/release.yml— sole change: newnotify-discordjob appended at the endSolution
Job placement —
notify-discordruns afterpublish-releasesucceeds. It is the last node in the DAG; no job depends on it, so a failure has zero blast radius on the release itself.Graceful degradation — Two early-exit guards (
!webhookUrl, invalidreleaseId) return withcore.warninginstead ofcore.setFailed, so the job always exits green even with missing config. The step additionally carriescontinue-on-error: trueas a belt-and-suspenders guard against action-level failures.Embed content — The script:
github.rest.repos.getRelease.#noise in Discord) and truncates at 3500 chars.color: 0x2ecc71(green) for stable,0xf0ad4e(amber) for pre-releases.Secret required —
DISCORD_RELEASE_WEBHOOK_URLmust be set as aProductionenvironment secret. No other secrets are introduced; the job readsRELEASE_IDandRELEASE_TAGfrom upstream job outputs.Submission Checklist
continue-on-errorguard and manual test against a Discord channel. No app binary or RPC surface is touched.core.warningvscore.setFailedrationale).continue-on-error: trueis at the step level, whycore.warningis used instead ofcore.setFailed, and the 3500-char / 8-asset caps.Local CI commands run and passed:
Impact
DISCORD_RELEASE_WEBHOOK_URLis not set, the step exits cleanly with a warning.Related
#100
#pre-releaseschannel for pre-release tags.