Skip to content

ci(release): see each new release in the Telegram alerts chat - #1503

Merged
MicBun merged 1 commit into
mainfrom
ci/release-announce
Nov 25, 2026
Merged

MicBun merged 1 commit into
mainfrom
ci/release-announce

Conversation

@MicBun

@MicBun MicBun commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

When a release is published, release.yaml now posts one message about it to the Telegram chat and topic that the node alerts use, with the same bot. The message goes out after the binaries are uploaded, and only once per release. Before the build, the workflow counts the release's assets, and it posts only when there were none and the upload succeeded. That covers the publish, and also the edit that fixes a release whose first run failed. Later edits and manual runs post nothing.

  • scripts/release/announce-telegram.sh checks the notes with check-upgrade-line.sh, so it refuses the same notes, and builds the message from the upgrade line and the tag. It sends it with sendMessage in HTML parse mode, with link previews off. The token reaches curl through stdin, as in deployments/alerts/node-health-alert.sh.
  • scripts/release/test-announce-telegram.sh tests every form and sends to a local fake Telegram. The release-upgrade-line CI job runs it.
  • docs/release-process.md has a new section, "The Telegram Announcement", and the publishing steps say when the post goes out.

The post never fails a release. Without the token or the chat id, as in a fork, the script prints a notice and exits 0. If Telegram refuses the message, the step has continue-on-error and the run shows a warning.

Examples

Telegram shows <code>kwild version</code> as code.

Required on both networks:

REQUIRED: TN node v2.6.9

Install it before:
- mainnet block 3,300,000 (about 2026-12-10 12:00 UTC)
- testnet block 16,300,000 (about 2026-12-03 12:00 UTC)

A node still on an older release stops at that block. After upgrading, <code>kwild version</code> prints 2.6.9.

Release: https://github.com/trufnetwork/node/releases/tag/v2.6.9
How to upgrade: https://github.com/trufnetwork/node/blob/main/docs/node-upgrade-guide.md#required-in-place-upgrade

Required on one network (testnet only reads the same, with the networks swapped):

REQUIRED on mainnet: TN node v2.6.9

Install it before mainnet block 3,300,000 (about 2026-12-10 12:00 UTC). On testnet it is optional.

A node still on an older release stops at that block. After upgrading, <code>kwild version</code> prints 2.6.9.

Release: https://github.com/trufnetwork/node/releases/tag/v2.6.9
How to upgrade: https://github.com/trufnetwork/node/blob/main/docs/node-upgrade-guide.md#required-in-place-upgrade

Optional:

TN node v2.6.9 is out. Optional: nodes on older releases keep following the chain, so upgrade when it suits you.

Release: https://github.com/trufnetwork/node/releases/tag/v2.6.9

How Has This Been Tested?

  • scripts/release/test-announce-telegram.sh: all 117 checks pass. They cover the exact text of each form, thousands separators, HTML escaping, the guide anchor, refused notes, a missing token or chat id, and four sends to a local fake Telegram that check every posted field. A curl wrapper checks that the token is never on curl's command line or in the output.
  • scripts/release/test-check-upgrade-line.sh: all cases pass.
  • shellcheck 0.11.0 on scripts/release/*.sh: clean.
  • actionlint v1.7.7 on release.yaml and ci.yaml: only the 3 findings main already has, in the existing "Set Version" step and in ci.yaml.

I did not run a real release or post to the real chat.

Related

Review in Wizard

Read and comment on these documents without using GitHub:

Summary by CodeRabbit

  • New Features

    • Release announcements are now posted to Telegram after a successful initial binary upload. Messages include required or optional upgrade details and relevant network information.
    • Updating release notes and rebuilding binaries does not trigger another announcement.
    • Announcement failures do not prevent the release workflow from completing.
  • Documentation

    • Updated the release process guide with announcement timing and behavior.

@MicBun MicBun self-assigned this Nov 25, 2026
@holdex

holdex Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Time Submission Status

Member # Time Running Total Status Last Update
MicBun 1h 30min ✅ Submitted Nov 25, 2026, 12:12 PM

Submit or update total time with:

@holdex pr submit-time 2h

Add time on top of previous submission with:

@holdex pr add-time 1h30m

See available commands to help comply with our Guidelines.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds a script that builds Telegram release announcements from release-note upgrade lines. The release workflow runs it after successful uploads when the release has no existing assets. Tests and release-process documentation cover the new behavior.

Changes: Telegram release announcements

Layer / File(s) Summary
Build and test announcements
scripts/release/announce-telegram.sh, scripts/release/test-announce-telegram.sh, .github/workflows/ci.yaml
The script validates the upgrade line and formats required or optional release messages. It supports dry runs, optional Telegram credentials and topic IDs, and reports send failures. Tests use a local fake Telegram server and cover message formats, input handling, and request behavior. CI runs the test script.
Gate release announcements
.github/workflows/release.yaml, docs/release-process.md
The workflow reads the release asset count and runs the announcement script only for release events with zero existing assets and a successful upload. Documentation describes the announcement conditions, message contents, and failure handling.

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant GitHubAPI
  participant AnnounceTelegram
  participant TelegramAPI
  GitHubActions->>GitHubAPI: Read release asset count
  GitHubAPI-->>GitHubActions: Return asset count
  GitHubActions->>GitHubActions: Upload release binaries
  GitHubActions->>AnnounceTelegram: Run when count is zero and upload succeeds
  AnnounceTelegram->>TelegramAPI: Send formatted announcement
  TelegramAPI-->>AnnounceTelegram: Return HTTP response
Loading

Possibly related issues

Possibly related PRs

Merge Risk: Minimal · up to 5c691

This change adds a non-blocking Telegram announcement for new releases. Failures only produce a warning, so releases are not affected. Rare upload failures could skip or repeat an announcement, but this has no wider impact.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: release announcements now post to the Telegram alerts chat. The PR adds a release.yaml step that posts a Telegram announcement after a first successful binary upload, …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: release announcements now post to the Telegram alerts chat. The PR adds a release.yaml step that posts a Telegram announcement after a first successful binary upload, backed by a new announce-telegram.sh script and its test harness. The title uses the ci(release) prefix, which matches the changed workflow and scripts. It omits the upgrade-line checks and the warning-only handling, which is acceptable since it need not cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e189e17-6280-4df1-91a4-a09e9db1ba55
Commits

Reviewing files that changed from the base of the PR and between baa451d and 5c691c3.

Files selected for processing: 5

  • .github/workflows/ci.yaml
  • .github/workflows/release.yaml
  • docs/release-process.md
  • scripts/release/announce-telegram.sh
  • scripts/release/test-announce-telegram.sh

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@MicBun

MicBun commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

@holdex pr submit-time 1h30m

@MicBun
MicBun merged commit 8e70cf0 into main Nov 25, 2026
13 checks passed
@MicBun
MicBun deleted the ci/release-announce branch November 25, 2026 12:12
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