replay-software / bump

An automated pipeline for releasing apps with Sparkle
https://replay.software/bump
MIT License
216 stars 3 forks source link

Bump is an automated pipeline for releasing apps withย Sparkle

Features:

Ready to try it? Get started.

Please note;


Contents

Getting started

1. Create a new repo using this template

Create a new repo using this template. This will copy the entire directory structure into your own GitHub account.

2. Update variables

Edit config.yml and replace the default values;

app_name: AppExample 
app_filename: AppExample.zip
s3_bucket_name: app-example-distribution

3. Create secrets

In the Settings of your repo, create the following secrets;

Secret name Required? Description
AWS_ACCESS_KEY โ˜‘๏ธ An AWS access key that has permissions to create an S3 bucket
AWS_SECRET_KEY โ˜‘๏ธ An AWS secret key
SPARKLE_PRIVATE_KEY A Sparkle private key. You can find this in your macOS keychain. You can omit this but it is encouraged to sign your releases.

4. Creating a release

  1. Place your notarised, zipped app in the ./release/ folder. The name of the zip should match the app_filename you have set in config.yml. Ensure you delete any other .zip that exists in this directory.
  2. Edit ./release/latest.md to reflect this new release. You will want to change the version number and probably add a description. View the list of Sparkle attributes you can set in this file
  3. Create a pull request into the main or master branch (Bump supports both) of your repository.

Upon opening a pull request, Bump will create and commit a new changelog.xml into your branch not release anything publicly.

Upon merging to main/master, Bump will push your new changelog.xml and app release to your S3 bucket, making it publicly available to your customers.

Find the link to your publicly hosted changelog.xml from Actions โ†’ Latest run โ†’ Build and expand the "Apply Terraform plan" panel to see the output. It will be in the format https://{{bucketName}}.s3.amazonaws.com/changelog.xml


Appendix

S3 Information

By default, Bump will use aws region us-east-1. You can override this by changing the Terraform plan at .bump/main.tf.

App archive support

Bump supports serving the following app archive types;

Release frontmatter

The following keys can be used in the ./release/lastest.md frontmatter;

Key Name Required? Type Example Description
version โ˜‘๏ธ string "1.2.0" or "100" The version of your app
marketingVersion string "1.0" Can be used in addition to version. Note: setting this property means you should use version value for the build number (e.g. "100"). Read the Sparkle documentation on shortVersionString for more info
minimumSystemVersion string "10.5" The lowest version of macOS that this release supports

Running locally / self-hosted

Bump has been crafted to work with GitHub Actions but can also be run locally. Some things to note;

API Support

Bump generates a JSON version of the changelog so that you can easily consume the changelog in a web app. To use it, find your changelog URL and replace the extension with .json

e.g. https://your-bucket-url.s3.amazonaws.com/changelog.xml โ†’ https://your-bucket-url.s3.amazonaws.com/changelog.json

Note: the default setting for CORS access is to allow all origins. To change this edit the cors stanza in the Terraform script at ./bump/main.tf

Updating from a previous version of Bump

Updating Bump is easy. Simply copy the .bump folder from this repository to your own.