bsnes-emu / bsnes

bsnes is a Super Nintendo (SNES) emulator focused on performance, features, and ease of use.
Other
1.63k stars 154 forks source link

Simplify + update GitHub Actions workflow #307

Closed jchv closed 7 months ago

jchv commented 7 months ago

The hope is that using Octokit.js will buy us a lot of time, as the API should be very stable at this point in time. Even if the GitHub API shifts, these fairly high-level calls shouldn't need to break much if at all, and I think the stuff this script does are complicated enough to warrant avoiding bash for the main logic. Using Octokit.js theoretically gives us retry logic and more for free, which should make the code less prone to flaking out.

This is mostly just a proposal, and I'd be happy to make changes to try to make it more palatable. We could try to move the release creation into the script step if we want to avoid needing a third-party action altogether, though I am skeptical it would be worth it.

Screwtapello commented 7 months ago

I do wonder whether it would be better to use the third-party softprops/action-gh-release@v1 action, or just have another instance of the actions/github-script@v7 action and write the logic in JS ourselves... but that's really a question about which of the two is more likely to break first, and I do not have a sufficiently-informed opinion to guess, let alone decide.

I'll leave this open for a day or two to see if anybody else has feedback, but if nobody else objects I'll merge it (unless somebody else beats me to it).

jchv commented 7 months ago

We could probably just do it all in a single github-script action. I can look into it. (This would also save us from needing to do the relinfo step as that's only needed to deal with the limited functionality of actions yaml. Inside JS we can just do whatever logic we need using Date.)