[PR #9] [CLOSED] Add Auto Update with Sparkle #32

Closed
opened 2026-03-03 16:45:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nickustinov/itsytv-macos/pull/9
Author: @donavanbecker
Created: 2/5/2026
Status: Closed

Base: mainHead: main


📝 Commits (2)

  • 2716f6f Add Auto Update with Sparkle
  • 5e64f2a Add Auto Update with Sparkle

📊 Changes

8 files changed (+392 additions, -2 deletions)

View changed files

.github/workflows/generate-appcast.yml (+77 -0)
Tests/UpdateCheckerTests.swift (+92 -0)
docs/UPDATE-INSTRUCTIONS.md (+12 -0)
📝 itsytv/Info.plist (+4 -0)
itsytv/Utilities/SparkleBridge.swift (+29 -0)
📝 itsytv/Utilities/UpdateChecker.swift (+49 -2)
📝 project.yml (+5 -0)
scripts/generate_appcast.py (+124 -0)

📄 Description

Summary

This PR adds optional automatic updates via Sparkle, an appcast generator script, and a GitHub Actions workflow to publish the appcast to GitHub Pages. When Sparkle is not linked, the app falls back to a GitHub-release check UI.

Changes

  • Dependencies: add Sparkle (SPM) in project.yml.
  • Update checker: itsytv/Utilities/UpdateChecker.swift now prefers Sparkle (when available) and falls back to the existing GitHub-release behavior.
  • Sparkle bridge: itsytv/Utilities/SparkleBridge.swift provides a compile-time wrapper (no-op when Sparkle not present).
  • Appcast generator: scripts/generate_appcast.py builds a Sparkle-compatible appcast.xml from GitHub Releases.
  • Workflow: .github/workflows/generate-appcast.yml runs on release publish, generates docs/appcast.xml, and publishes docs/ to gh-pages via peaceiris/actions-gh-pages.
  • Docs: docs/UPDATE-INSTRUCTIONS.md explains SPM setup, feed URL configuration, and signing considerations.

Testing / How to verify

  1. Add Sparkle via Swift Package Manager in Xcode or run xcodegen generate then resolve packages in Xcode.
  2. Configure feed URL (example in code currently points to https://nickustinov.github.io/itsytv-macos/appcast.xml) by setting SUFeedURL in Info.plist or editing UpdateChecker.swift.
  3. Create and publish a GitHub Release containing a macOS artifact (.zip, .dmg, or .pkg). The workflow will generate docs/appcast.xml and publish to gh-pages.
  4. Run the app and call UpdateChecker.check() — Sparkle should detect the appcast and present the update UI (or auto-download depending on Sparkle config).

Deployment notes

  • Enable GitHub Pages to serve from the gh-pages branch.
  • For secure updates, sign update archives and include Sparkle signatures in the appcast (not handled by this script).

Checklist

  • Add Sparkle via SPM / resolve packages
  • Set real appcast URL in UpdateChecker.swift or Info.plist
  • Enable GitHub Pages (serve gh-pages)
  • Publish a signed release with macOS asset

Next steps / suggestions

  • Add automatic signing to CI or a release workflow to produce signed artifacts and include sparkle:edSignature in the appcast.
  • Optionally extend scripts/generate_appcast.py to include signature attributes when signatures are available.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nickustinov/itsytv-macos/pull/9 **Author:** [@donavanbecker](https://github.com/donavanbecker) **Created:** 2/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`2716f6f`](https://github.com/nickustinov/itsytv-macos/commit/2716f6f836767a00c323efb7f372ec8d12ac117e) Add Auto Update with Sparkle - [`5e64f2a`](https://github.com/nickustinov/itsytv-macos/commit/5e64f2a0b0279c4f7cf84f8d49a32af9ee28ea8f) Add Auto Update with Sparkle ### 📊 Changes **8 files changed** (+392 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.github/workflows/generate-appcast.yml` (+77 -0) ➕ `Tests/UpdateCheckerTests.swift` (+92 -0) ➕ `docs/UPDATE-INSTRUCTIONS.md` (+12 -0) 📝 `itsytv/Info.plist` (+4 -0) ➕ `itsytv/Utilities/SparkleBridge.swift` (+29 -0) 📝 `itsytv/Utilities/UpdateChecker.swift` (+49 -2) 📝 `project.yml` (+5 -0) ➕ `scripts/generate_appcast.py` (+124 -0) </details> ### 📄 Description ## Summary This PR adds optional automatic updates via Sparkle, an appcast generator script, and a GitHub Actions workflow to publish the appcast to GitHub Pages. When Sparkle is not linked, the app falls back to a GitHub-release check UI. ## Changes - **Dependencies**: add `Sparkle` (SPM) in `project.yml`. - **Update checker**: `itsytv/Utilities/UpdateChecker.swift` now prefers Sparkle (when available) and falls back to the existing GitHub-release behavior. - **Sparkle bridge**: `itsytv/Utilities/SparkleBridge.swift` provides a compile-time wrapper (no-op when Sparkle not present). - **Appcast generator**: `scripts/generate_appcast.py` builds a Sparkle-compatible `appcast.xml` from GitHub Releases. - **Workflow**: `.github/workflows/generate-appcast.yml` runs on release publish, generates `docs/appcast.xml`, and publishes `docs/` to `gh-pages` via `peaceiris/actions-gh-pages`. - **Docs**: `docs/UPDATE-INSTRUCTIONS.md` explains SPM setup, feed URL configuration, and signing considerations. ## Testing / How to verify 1. Add Sparkle via Swift Package Manager in Xcode or run `xcodegen generate` then resolve packages in Xcode. 2. Configure feed URL (example in code currently points to `https://nickustinov.github.io/itsytv-macos/appcast.xml`) by setting `SUFeedURL` in `Info.plist` or editing `UpdateChecker.swift`. 3. Create and publish a GitHub Release containing a macOS artifact (`.zip`, `.dmg`, or `.pkg`). The workflow will generate `docs/appcast.xml` and publish to `gh-pages`. 4. Run the app and call `UpdateChecker.check()` — Sparkle should detect the appcast and present the update UI (or auto-download depending on Sparkle config). ## Deployment notes - Enable GitHub Pages to serve from the `gh-pages` branch. - For secure updates, sign update archives and include Sparkle signatures in the appcast (not handled by this script). ## Checklist - [ ] Add Sparkle via SPM / resolve packages - [ ] Set real appcast URL in `UpdateChecker.swift` or `Info.plist` - [ ] Enable GitHub Pages (serve `gh-pages`) - [ ] Publish a signed release with macOS asset ## Next steps / suggestions - Add automatic signing to CI or a release workflow to produce signed artifacts and include `sparkle:edSignature` in the appcast. - Optionally extend `scripts/generate_appcast.py` to include signature attributes when signatures are available. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:45:05 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/itsytv-macos#32
No description provided.