# A release's notes are copied here once, when release.yml's mirror-release # job publishes it. When DeepSeek turned the notes away, magpie-releases' # notes.yml writes them again later (each hour, at :23), and this copies # them to this repo's release of the same tag: one here still without the # marker gets magpie-releases' notes once those have it. # The app reads magpie-releases (usemagpie.ai's /api/notes), so this is # the GitHub page alone. name: notes-mirror on: schedule: - cron: '53 * * * *' workflow_dispatch: permissions: contents: write jobs: mirror: runs-on: ubuntu-latest env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - name: Copy notes written again run: | set -uo pipefail tags=$(gh release list -R "$GITHUB_REPOSITORY" -L 100 --exclude-drafts --json tagName -q '.[].tagName') || exit 1 for t in $tags; do here=$(gh release view "$t" -R "$GITHUB_REPOSITORY" --json body -q .body) || continue if printf '%s' "$here" | grep -qF ''; then continue; fi there=$(gh release view "$t" -R yetone/magpie-releases --json body -q .body) || continue if ! printf '%s' "$there" | grep -qF ''; then continue; fi { printf '%s' "$there"; printf '\n\n---\nThe same release, and the feed magpie updates from: https://github.com/yetone/magpie-releases/releases/tag/%s\n' "$t"; } > notes.md gh release edit "$t" -R "$GITHUB_REPOSITORY" --notes-file notes.md >/dev/null && echo "$t: notes copied" done