Repository navigation
ci: announce published releases on Discord - #49
Merged
Merged
Conversation
A release-announce workflow calls the shared workflow of TechDufus/.github (pinned to a commit) when a GitHub release is published, and posts the release with its notes through the webhook in the repository secret DISCORD_RELEASES_WEBHOOK. A manual run with a tag announces an existing release again. Discord's own GitHub formatter links the title and leaves the notes out; this replaces the repository webhook that used it.
A reusable workflow is named by its owner and repository, so the caller's uses line has to carry the owner's name. The allowlist excuses that one form in release-announce.yml, and only when it is pinned to a commit; the comment and the release docs no longer name the owner.
6 of 7 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.
What and why
Publishing a GitHub release now posts it, with its notes, to Discord.
release-announce: onrelease: publishedit calls the shared workflowTechDufus/.github/.github/workflows/release-announce.yml, pinned to commitf7202aa. A manual run (workflow_dispatchwith a tag) announces an existing release again.DISCORD_RELEASES_WEBHOOK(already set), passed by name; nosecrets: inherit.docs/development.md: step 5 of the release procedure.How it was tested
actionlintandzizmor --config .github/zizmor.yml .github(1.32.0): no findings; no forbidden trigger.curlstubbed (titledash v0.16.1: usage figures stay in their cards, 758 characters of notes), plus cases for long notes, CRLF, no notes and a pre-release.v0.16.1.Checklist
make checkpasses. (left to CI: only a workflow and a doc changed)make generateand committed. (none affected)Hygiene allowlist
TestNoLabIdentifiersfailed on the first push: a reusable workflow is named by its owner and repository, so theuses:line carries the owner's name. The second commit adds one allowlist entry for that form in.github/workflows/release-announce.yml, only when the reference is pinned to a 40-character commit (the scan test proves a branch reference in the same file still hits), and rewords the workflow comment and the docs so they no longer name the owner. No other assertion changed.