This is a example project to show how to create a GitHub Action to automatically create a release for a macOS app, using Sparkle.
Complete guide to this project can be found here.
The owner creates a PR to main
(the branch which is used by GitHub Pages) and comments /release
. If the PR is mergeable, this triggers a GitHub Action which will:
- Extrapolate from
Release_Notes.md
the:- latest version number
- its release notes
- its title
- previous version number
- Replace all occurences of the previous version number with the new version number within the Xcode project
- Archive and export the Xcode project as a .app
- Run the
generate_appcast
tool from Sparkle, which will create/update the appcast.xml file in the Docs/Support folder - Create a GitHub release with the zipped app, the release notes, the latest version and the title
- Merge the PR, which triggers the GitHub action to build GitHub Pages, which will host the
appcast.xml
file. The update is so available for all users.
- In the
info.plist
file of the Xcode project:- Set the
SUFeedURL
tohttps://<username>.github.io/<repo>/Support/appcast.xml
- Set the
SUPublicEDKey
to the public key, see here on how to generate one
- Set the
- Add the private sparkle key to the GitHub secrets
- Add a build certificate and a provision profile to the GitHub secrets, see here - needed in step 3
- Add a
Release_Notes.md
file to the root of the project, (look at Release_Notes.md for an example of how the release notes should be formatted))]) - Add a
docs
folder to the root of the project, with aSupport
folder inside it. This is where theappcast.xml
file will be generated and hosted. - Set
docs
in themain
branch as the GitHub Pages source (repository settings > pages > source) - In the Xcode project set the project and marketing versions to the same value (Project > General > Identity > Version and Build)
- Add an item in the Release_Notes.md file for the current version, with the title
# <version> - <title>
, e.g.# 1.0.0 - Initial Release
, this will be used by the workflow to get the previous version number - Create a Configuration folder and copy all the files from the
Configuration
folder in this repo to it