Skip to content

feat(release): announce releases from the release umbrella workflow - #629

Merged
bedatty merged 3 commits into
developfrom
feat/unify-release-announcement-umbrella
Jul 29, 2026
Merged

feat(release): announce releases from the release umbrella workflow#629
bedatty merged 3 commits into
developfrom
feat/unify-release-announcement-umbrella

Conversation

@bedatty

@bedatty bedatty commented Jul 29, 2026

Copy link
Copy Markdown
Contributor
Lerian

GitHub Actions Shared Workflows


Description

Release announcements were only reachable through a standalone caller workflow wired on on: release, so each repository had to duplicate that wiring and the shared release pipeline had no knowledge of where its announcement should land. This PR moves the announcement into the release umbrella and makes the routing per-repository.

release.yml — new announce_release job that calls release-notification.yml after a successful release. Routing is resolved entirely from the calling repository:

  • channel: announcement_slack_channel input, falling back to the RELEASE_SLACK_CHANNEL repository variable
  • webhook: RELEASE_WEBHOOK_URL repository secret, falling back to RELEASE_WEBHOOK_NOTIFICATION_URL (already in use by some repos)
  • announced tag: publish_release_status.outputs.release_git_tag

The job is skipped when no channel is configured, and the notification step inside release-notification.yml is skipped (non-fatal) when the webhook secret is absent. Three new inputs: enable_release_announcement (default true), announcement_product_name, announcement_slack_channel.

release-notification.yml — new optional release_tag input. The tag resolution chain becomes release_taggithub.event.release.tag_namegh release list --limit 1. Without it the umbrella would announce the newest release in the repository, which is the wrong tag on monorepo runs where a matrix leg other than the last one published. The input is deliberately not exposed on workflow_dispatch (free-text string reaching shell/composite interpolation).

go-release.yml / js-release.yml — both already delegate to release.yml, so they only expose the three new inputs and pass them through.

Discord is intentionally not wired into the umbrella job. SethCohen/github-releases-to-discord reads github.context.payload.release (index.js:117), which does not exist on the push event that drives release.yml. DISCORD_WEBHOOK_URL is not forwarded, so Discord announcements keep working through a dedicated on: release caller of release-notification.yml.

Docs updated: docs/release-workflow.md (new Release Announcement section with consuming-repo setup, behavior matrix, Discord limitation and duplicate-announcement warning), docs/release-notification.md, docs/go-release-workflow.md, docs/js-release.md.

Type of Change

  • feat: New workflow or new input/output/step in an existing workflow
  • fix: Bug fix in a workflow (incorrect behavior, broken step, wrong condition)
  • perf: Performance improvement (e.g. caching, parallelism, reduced steps)
  • refactor: Internal restructuring with no behavior change
  • docs: Documentation only (README, docs/, inline comments)
  • ci: Changes to self-CI (workflows under .github/workflows/ that run on this repo)
  • chore: Dependency bumps, config updates, maintenance
  • test: Adding or updating tests
  • BREAKING CHANGE: Callers must update their configuration after this PR

Breaking Changes

None. No input or output was renamed, removed or type-changed, and every new input defaults to the previous behavior.

Two behavior notes for callers:

  1. enable_release_announcement defaults to true, so a repository that already has both a channel (announcement_slack_channel or RELEASE_SLACK_CHANNEL) and a webhook secret starts announcing without opting in. With no channel configured nothing is sent.
  2. A repository that already announces releases through a separate on: release workflow will receive two Slack messages once this job is active. Remove the standalone Slack announcement there, or set enable_release_announcement: false.

Nesting depth is worth noting: caller → go-release.yml/js-release.ymlrelease.ymlrelease-notification.yml is 4 levels, the maximum GitHub allows for reusable workflows.

Testing

  • YAML syntax validated locally
  • Triggered a real workflow run on a caller repository using @this-branch or the beta tag
  • Verified all existing inputs still work with default values
  • Confirmed no secrets or tokens are printed in logs
  • Checked that unrelated workflows are not affected

Validation performed: yaml.safe_load over the four changed workflows; the new release_tag value is passed through env instead of being interpolated directly into the shell; the existing notify job (CI status via slack-notify.yml) is untouched and announce_release is not added to its needs, so a failed announcement cannot mark the release as failed. typescript-release.yml has its own publish path and does not go through release.yml, so it is unaffected.

Related Issues

Closes #611

Add an announce_release job to release.yml that calls
release-notification.yml after a successful release, routing the
announcement per repository: channel from announcement_slack_channel or
the RELEASE_SLACK_CHANNEL variable, webhook from the RELEASE_WEBHOOK_URL
secret (RELEASE_WEBHOOK_NOTIFICATION_URL kept as fallback). The job is
skipped when no channel is configured and the notification step is
skipped when the webhook secret is absent.

release-notification.yml gains an optional release_tag input so the
umbrella announces the tag actually published by the run instead of the
newest release in the repository, which was wrong for monorepo matrix
legs.

go-release.yml and js-release.yml expose the three new inputs and pass
them through to release.yml.

Discord is not wired into the umbrella job:
SethCohen/github-releases-to-discord reads the release event payload,
absent on the push event that drives release.yml. Discord announcements
stay on a dedicated on: release caller.
@bedatty
bedatty requested a review from a team as a code owner July 29, 2026 14:24
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bbf1abac-6f12-4e40-b45e-ca6aec37f48f

📥 Commits

Reviewing files that changed from the base of the PR and between e7158f8 and 0a53757.

📒 Files selected for processing (1)
  • .github/workflows/release-notification.yml

Summary by CodeRabbit

  • New Features

    • Added configurable “Release Announcement” notifications to Slack, including enablement, product name, and destination channel settings.
    • Added optional support for specifying a release tag to announce, with fallback to the release event tag or, if unavailable, the latest available release.
  • Documentation

    • Updated release workflow guides to explain announcement setup, required secrets and fallback behavior, and the release tag resolution order for notifications.

Walkthrough

Release workflows now expose configurable Slack announcement inputs, dispatch notifications after release finalization, and support explicit release-tag resolution with documented fallbacks and webhook configuration.

Changes

Release announcements

Layer / File(s) Summary
Workflow inputs and caller propagation
.github/workflows/go-release.yml, .github/workflows/js-release.yml, .github/workflows/release.yml, docs/go-release-workflow.md, docs/js-release.md
Go, JavaScript, and umbrella workflows expose announcement enablement, product, and Slack channel inputs and pass them through to the release workflow.
Post-release announcement job
.github/workflows/release.yml, docs/release-workflow.md
A conditional announce_release job invokes the notification workflow after release finalization, forwarding release metadata and selecting the current or legacy webhook secret.
Notification tag resolution
.github/workflows/release-notification.yml, docs/release-notification.md
Notification dispatch accepts an optional release_tag, then falls back to the release event tag and latest-release lookup; dry-run wiring is refactored and Discord and Slack action references now use major versions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested labels: security

Suggested reviewers: gandalf-at-lerian

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning For [#611], routing/skip behavior is covered, but the required standard webhook payload and example payload doc are not evidenced. Add the payload fields (repo, tag, release_url, actor, ref) to the webhook POST and document at least one example payload for consuming repos.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and directly summarizes the release-announcement workflow change.
Description check ✅ Passed All required template sections are present and filled with specific PR details.
Out of Scope Changes check ✅ Passed The changes stay within release announcement workflows and docs; no unrelated edits are apparent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/unify-release-announcement-umbrella

Comment @coderabbitai help to get the list of available commands.

@lerian-studio lerian-studio added size/S PR changes 50–199 lines documentation Improvements or additions to documentation workflow Changes to one or more reusable workflow files golang Changes to Go-related workflows notify Changes to notification composite actions (src/notify/) labels Jul 29, 2026
@lerian-studio

lerian-studio commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation Summary

✅ PR Mergeable — no blocking failures

Check Status Blocking
Source Branch ✅ success yes
PR Title ✅ success yes
PR Description ✅ success yes
PR Size ✅ success no
Auto Labels ✅ success no
PR Metadata ✅ success no

🔍 View workflow run

@lerian-studio

lerian-studio commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🔍 Lint Analysis

Check Files Scanned Status
YAML Lint 4 file(s) ✅ success
Action Lint 4 file(s) ✅ success
Pinned Actions 4 file(s) ✅ success
Markdown Link Check 4 file(s) ✅ success
Spelling Check 8 file(s) ✅ success
Shell Check 4 file(s) ✅ success
README Check 4 file(s) ✅ success
Composite Schema no changes ⏭️ skipped
Deployment Matrix no changes ⏭️ skipped

🔍 View full scan logs

@lerian-studio

lerian-studio commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

🛡️ CodeQL Analysis Results

Languages analyzed: actions

✅ No security issues found.


🔍 View full scan logs | 🛡️ Security tab

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Warning

CodeRabbit couldn't request changes on this pull request because it doesn't have sufficient GitHub permissions.

Please grant CodeRabbit Pull requests: Read and write permission and re-run the review.

👉 Steps to fix this

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release-notification.yml:
- Around line 138-147: Update the release-tag resolution step and the later
dry-run summary to avoid embedding caller-controlled values in shell source:
expose the resolved tag through the step’s env configuration and reference it as
$RESOLVED_TAG, applying the same env-based handling to every interpolated input
used in that summary while preserving the existing tag fallback behavior.

In @.github/workflows/release.yml:
- Around line 638-642: Update the announcement job gate in the release workflow
so dry_run can proceed without requiring
needs.publish_release_status.outputs.release_published to equal 'true'. Preserve
the existing publication requirement for normal runs, and ensure the dry-run
path passes the intended preview tag to release-notification.yml so the
documented payload preview is produced.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: f2f2dd8a-1115-4696-bd60-d04689182158

📥 Commits

Reviewing files that changed from the base of the PR and between 898be5f and c04db58.

📒 Files selected for processing (8)
  • .github/workflows/go-release.yml
  • .github/workflows/js-release.yml
  • .github/workflows/release-notification.yml
  • .github/workflows/release.yml
  • docs/go-release-workflow.md
  • docs/js-release.md
  • docs/release-notification.md
  • docs/release-workflow.md

Comment thread .github/workflows/release-notification.yml
Comment thread .github/workflows/release.yml
The Discord and Slack release composites were pinned to @v1.18.0, which
the pinned-actions lint flags: internal composites must use the floating
major tag (@vn) while internal reusable workflows use an exact version.
Aligns both refs with the rest of the repository.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
.github/workflows/release-notification.yml (1)

138-147: ⚠️ Potential issue | 🔴 Critical

Still avoid interpolating the resolved tag into shell source.

The caller-controlled tag is safely received through env here, but it is later embedded directly in the dry-run script at Line 169. Export it through the step’s env: and reference $RESOLVED_TAG; apply the same pattern to every caller-controlled value used by that summary.

As per coding guidelines, never interpolate untrusted user input directly into run: commands; pass it through an environment variable.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release-notification.yml around lines 138 - 147, Update
the release-notification step’s dry-run summary to avoid interpolating the
resolved release tag or any other caller-controlled summary values into the run
script. Export each value through the step’s env configuration, including the
resolved tag as RESOLVED_TAG, and reference the corresponding shell variables
throughout the summary while preserving the existing tag resolution behavior.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Duplicate comments:
In @.github/workflows/release-notification.yml:
- Around line 138-147: Update the release-notification step’s dry-run summary to
avoid interpolating the resolved release tag or any other caller-controlled
summary values into the run script. Export each value through the step’s env
configuration, including the resolved tag as RESOLVED_TAG, and reference the
corresponding shell variables throughout the summary while preserving the
existing tag resolution behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5dd4f92a-d9d4-47b6-a9fc-250926231d19

📥 Commits

Reviewing files that changed from the base of the PR and between c04db58 and e7158f8.

📒 Files selected for processing (1)
  • .github/workflows/release-notification.yml

CodeQL flagged the dry-run summary step for interpolating product_name,
slack_channel and the resolved release tag straight into the run block.
Every value now reaches bash as an environment variable, and the
discord/slack enable flags are computed in shell instead of via
expression interpolation.
@lerian-studio lerian-studio added size/M PR changes 200–499 lines and removed size/S PR changes 50–199 lines labels Jul 29, 2026
@bedatty
bedatty merged commit 0acdda6 into develop Jul 29, 2026
20 checks passed
@github-actions
github-actions Bot deleted the feat/unify-release-announcement-umbrella branch July 29, 2026 15:00
@coderabbitai coderabbitai Bot mentioned this pull request Jul 29, 2026
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation golang Changes to Go-related workflows notify Changes to notification composite actions (src/notify/) size/M PR changes 200–499 lines workflow Changes to one or more reusable workflow files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: unify release announcements with per-repo webhook routing via repository secret

2 participants