Skip to content

Add release event dispatcher workflow#2650

Open
mattdholloway wants to merge 1 commit into
mainfrom
mattdholloway/release-event-dispatch
Open

Add release event dispatcher workflow#2650
mattdholloway wants to merge 1 commit into
mainfrom
mattdholloway/release-event-dispatch

Conversation

@mattdholloway

Copy link
Copy Markdown
Contributor

What

Adds an opt-in workflow that fires repository_dispatch on release events to a downstream repository, when one is configured via the RELEASE_AUTOMATION_REPO repository variable. When the variable is unset, the workflow is a no-op — so forks and other adopters pay no overhead unless they explicitly opt in.

Event types emitted

Trigger Event type Skipped on
release: { types: [created] } mcp-server-release-drafted prerelease == true
release: { types: [published] } mcp-server-released prerelease == true

The downstream payload is { tag, url } only — no other release data crosses the boundary.

Required when opting in

Kind Name Purpose
Variable RELEASE_AUTOMATION_REPO owner/repo of the downstream repository
Secret RELEASE_AUTOMATION_DISPATCH_PAT PAT (or GitHub App token) with actions: write on that repo

If the variable is unset, the dispatch job is skipped with no action. If the variable is set but the secret is missing, the job fails with a clear error.

Why this exists

Allows release events from this repository to drive downstream automation (e.g. dependency bumps, downstream test runs, notifications) without coupling that automation's logic into this repository. The downstream repository owns its own behavior; this workflow just signals the event.

Testing

  • With RELEASE_AUTOMATION_REPO unset: no-op confirmed (job's if: evaluates false).
  • With it set: published release fires mcp-server-released to the target repo, observable in that repo's Actions tab as a repository_dispatch event.

Concurrency

Scoped per (release_id, action) so re-edits of the same release don't fan out.

Adds an opt-in workflow that fires repository_dispatch on release events
to a downstream repository, when one is configured via the
RELEASE_AUTOMATION_REPO repository variable. When the variable is unset,
the workflow is a no-op so forks and other adopters pay no overhead.

Two event types are emitted:

  mcp-server-release-drafted   on release: { types: [created] }
  mcp-server-released          on release: { types: [published] }

Prereleases are skipped for both event types. The downstream payload is
{ tag, url } only — no other release data crosses the boundary.

Required when RELEASE_AUTOMATION_REPO is set:

  Variable  RELEASE_AUTOMATION_REPO          owner/repo of the downstream
  Secret    RELEASE_AUTOMATION_DISPATCH_PAT  PAT with actions:write on it

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mattdholloway mattdholloway marked this pull request as ready for review June 10, 2026 10:40
@mattdholloway mattdholloway requested a review from a team as a code owner June 10, 2026 10:40
Copilot AI review requested due to automatic review settings June 10, 2026 10:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a GitHub Actions workflow to optionally forward release lifecycle events from this repository to a downstream repository via repository_dispatch, controlled by a repository variable so the default behavior is a no-op.

Changes:

  • Introduces release-triggered workflow that maps createdmcp-server-release-drafted and publishedmcp-server-released.
  • Skips prereleases and sends only { tag, url } in client_payload.
  • Gates the entire job on vars.RELEASE_AUTOMATION_REPO being set, and fails with a clear error if the PAT secret is missing when opted-in.
Show a summary per file
File Description
.github/workflows/release-dispatch.yml Adds opt-in release event dispatching to a configured downstream repo using gh api and a PAT secret.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new

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.

2 participants