mmozeiko / build-sdl3

Automatic build of SDL3 libraries for Windows
41 stars 6 forks source link

How to always get the latest build? #3

Open Curculigo opened 1 month ago

Curculigo commented 1 month ago

I'm writing a script that will fetch the binary build from your repository. The problem is your releases are date-based. Can you setup something like a nightly release that with the same URL one will always get the latest build?

I don't have much experience with Github Actions. But I have seen people setup something like that in their repository. For example:

https://github.com/AdeptLanguage/Adept/releases/tag/Nightly

Please have a look at it. Thank you.

mmozeiko commented 1 month ago

You can get info for latest releases using json endpoint for GitHub api: https://api.github.com/repos/mmozeiko/build-sdl3/releases

If you want download link for latest release, you can use curl & jq on commandline to get url for release assets:

curl https://api.github.com/repos/mmozeiko/build-sdl3/releases | jq ".[0].assets[1].browser_download_url"

This will print out x64 zip file url, change [1] to [0] for arm64 zip file.