Repository navigation
Release: post every published version to the Telegram channel - #80
Merged
Merged
Conversation
The caption is now the channel post the owner writes by hand: a bold "Sozo X is out!", an italic tagline, a short list, then All files and TV Side links, Discord and Help & Support. The list comes from a hidden <!-- telegram --> block in the notes when there is one, otherwise from the notes' bold titles, one per section in turn, otherwise from the merged changes. Length is measured the way Telegram counts it. A new step posts the banner and this caption to the channel named by the TELEGRAM_CHANNEL variable once the release is published.
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.
What
Every published release now posts to the Telegram channel in the same style as the hand-made 3.2.1 post: the banner, then
sozo-tvrelease);Where the list comes from
docs/releases/vX.Y.Z.md, when it exists. This is the way to get exactly the wording you want:The caption stays within Telegram's 1024-character photo caption limit, counted the way Telegram counts it: visible text in UTF-16, so link URLs don't count. When it runs out of room, it drops bullets, never the links.
Setup needed once
TELEGRAM_CHANNEL, e.g.@sozoapp.TELEGRAM_CHANNEL_BOT_TOKENif set, otherwise the existingTELEGRAM_BOT_TOKEN.Until the variable is set, the step only leaves a notice. The channel post goes out only when the release is published and the publish job succeeded, because the post links to the release page. Draft runs and runs with
announce: falsedon't post.The existing build delivery to
TELEGRAM_CHAT_IDS(the APK files) is unchanged and now uses the same caption.Checks
python3 tool/compose_release_notes_test.py: 22 tests pass, including new ones for the hidden block, the fallbacks, the length limit and a single oversized bullet.release.yml.