Skip to content

Commit ce39ee5

Browse files
zoomote[bot]roomoteedelauna
authored
[Chore] Add weekly Discord release reminder (Zoo-Code-Org#900)
* chore: add weekly Discord release reminder * ci(release-reminder): add concurrency guard, failure notification, and shell hardening --------- Co-authored-by: Roomote <roomote@roomote.dev> Co-authored-by: Elliott de Launay <edelauna@gmail.com>
1 parent db2a991 commit ce39ee5

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Post weekly release reminder
2+
3+
# Requires repo secret DISCORD_RELEASE_WEBHOOK_URL — Discord webhook for the
4+
# release-reminders channel. The reminder job fails (noisily) if it is unset.
5+
6+
on:
7+
schedule:
8+
# Friday at 09:00 UTC
9+
- cron: "0 9 * * 5"
10+
workflow_dispatch:
11+
12+
permissions: {}
13+
14+
concurrency:
15+
group: release-reminder
16+
# A re-run produces an identical message, so cancel a stale/duplicate run
17+
# rather than risk posting twice.
18+
cancel-in-progress: true
19+
20+
jobs:
21+
remind:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Post release reminder to Discord
25+
env:
26+
DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
27+
run: |
28+
set -euo pipefail
29+
owners=("Elliott" "Navad" "Toray")
30+
anchor_date="2026-07-17"
31+
seconds_since_anchor=$(($(date -u +%s) - $(date -u -d "$anchor_date" +%s)))
32+
weeks_since_anchor=$((seconds_since_anchor / 604800))
33+
owner="${owners[$((weeks_since_anchor % ${#owners[@]}))]}"
34+
35+
message=$(cat <<EOF
36+
**Weekly release reminder**
37+
38+
**${owner}** is on deck for this week's Zoo Code release.
39+
40+
1. Create the release branch and prepare the release with \`.roo/commands/release.md\`.
41+
2. Get the release PR approved.
42+
3. Tag the release branch to trigger the Marketplace publish workflow.
43+
4. Approve the deployment when the \`marketplace-production\` environment requests it.
44+
5. After publishing succeeds, add the release PR to the merge queue.
45+
46+
Avoid merging or rebasing the release branch before publishing, so the approved tag keeps the intended commit SHA.
47+
48+
More detail: https://discord.com/channels/1497384592494297201/1498024845945081999/1512914847124291667
49+
EOF
50+
)
51+
52+
payload=$(jq -n --arg content "$message" '{content: $content}')
53+
curl --fail-with-body --silent --show-error \
54+
--header 'Content-Type: application/json' \
55+
--data "$payload" \
56+
"$DISCORD_RELEASE_WEBHOOK_URL"
57+
58+
- name: Notify on failure
59+
if: failure()
60+
env:
61+
DISCORD_RELEASE_WEBHOOK_URL: ${{ secrets.DISCORD_RELEASE_WEBHOOK_URL }}
62+
run: |
63+
set -euo pipefail
64+
payload=$(jq -nc --arg content "⚠️ release-reminder workflow failed — see the Actions runs." '{content: $content}')
65+
curl --fail-with-body --silent --show-error \
66+
--header 'Content-Type: application/json' \
67+
--data "$payload" \
68+
"$DISCORD_RELEASE_WEBHOOK_URL" || true

0 commit comments

Comments
 (0)