Creating Mac installer packages from CI

Hi all

I’m looking into options for creating Mac installer packages from the command for running from CI.

I’ve looked at:

  • Packages (can be run from the command line) - issue is that I don’t know the payload path until the build is finished
  • munkipkg
  • autoPkg - this seems to be a good/recommended solution, looking into it at the moment.

Any tips from experienced developers who have automated CI builds to create Installer packages?

In surge we just scripted it with pkgbuild but I haven’t done the sign in ci thing yet so we end up with a unsigned package. But check out the surge GitHub to see what we did - and it runs in ci no problem. That may help?

2 Likes

I’m creating a Packages based installer for my OJD via GitHub Actions – this works for me. You can find the relevant part of the build script here:

If you already have a Packages-based installer set up, this is an option to consider. However, for a new installer I probably would drop the packages layer completely and would try a pkgbuild bases approach, which should probably lead to the same result but without depending on a niche tool which e.g. is not even present on a vanilla GitHub Actions runner machine.

2 Likes

If you really don’t know the path until the build has finished then the packages project files are just XML, not too hard to update the XML with the relevant path (or even add new files) from a script.

Or maybe try creating a symlink to the payload and have the packages project refer to the symlink? I’m not sure if it will work but could be worth a try.

Unfortunately, I can’t comment on the others as I’ve no experience with them.

2 Likes

Thanks @baconpaul your installer scripts look like a great template for CI based plugin installers!!

1 Like