Skip to content

Sync appcast

Sync appcast #1

Workflow file for this run

name: Sync appcast
# Publishes the Sparkle feed. The release pipeline in capsule-native/capsule signs appcast.xml
# and attaches it to each GitHub Release; this job pulls the latest release's appcast.xml and
# commits it here, which republishes https://capsule-native.github.io/appcast.xml via Pages.
#
# It uses this repo's own GITHUB_TOKEN (same-repo write) — no deploy key or PAT needed. Runs on
# a schedule (picks up new releases automatically) and on demand (run it right after a release
# for an instant publish).
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: sync-appcast
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Pull latest appcast from the Capsule release
run: |
url="https://github.com/capsule-native/capsule/releases/latest/download/appcast.xml"
if curl -fsSL "$url" -o appcast.new.xml; then
if ! cmp -s appcast.new.xml appcast.xml; then
mv appcast.new.xml appcast.xml
echo "changed=true" >> "$GITHUB_ENV"
echo "Appcast changed — will commit."
else
rm -f appcast.new.xml
echo "Appcast unchanged."
fi
else
echo "No published appcast.xml on the latest release yet — nothing to sync."
fi
- name: Commit updated appcast
if: env.changed == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add appcast.xml
git commit -m "chore: sync appcast from latest Capsule release"
git push