replay-software / bump

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

Github Releases support #7

Open okwasniewski opened 1 year ago

okwasniewski commented 1 year ago

Hey!

Thanks for creating this awesome tool, I was wondering If I can plug it into Github Releases to upload a zip file instead of S3?

janbrasna commented 6 months ago

I'm also looking into this to avoid having to use S3 just for the storage. Basically you can upload artifacts to GH Releases via many 3rdparty actions but since the gh cli is always present on the runners you can just gh release upload ${{github.event.release.tag_name}} file.ext instead… [ref]

The location of the appcast.xml feed obviously has to be persistent, so glancing the releases URLs make it seem impossible:

but you can always link to the latest release with /latest/ version shim, making the appcast URL effectively stay https://github.com/octocat/octocat/releases/download/latest/appcast.xml when you keep adding the currentmost updated version to the release artifacts.

(Or when the appcast is committed inside the repo can then be linked as raw.githubusercontent… etc. but unlike releases, when something in the URL structure changes (like moving the file around or changing branch names), you won't always get redirects to the new location. You can probably keep a redirect at your site example.org/appcast.xml to this raw.githubusercontent… for more control, but e.g. if you generate your web sites via GH Pages you can't do such outbound redirects anyways so that might be more open-ended for every developer to tailor a bit more to their case.)

So this could be doable, storing all the assets only within the GitHub Releases artifacts.

(Not sure how about delta updates and supported OS requirements [see], and the bit about pre-releases is also a good one…)

Don't have a strong opinion as how to make the choice in the workflows… but since today Bump a) has implicit ties to the terraform workflow, and also b) some manual release steps bump/README.md#4-creating-a--release that won't be needed (ar at least the same) in GH Releases style of doing things, this remains the tricky part — instead of the local files, folders and zips, work with the paths already in releases (probably would need to be published before in a draft etc. …) — this is where my insight ends unfortunately.