Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify + update GitHub Actions workflow #307

Merged
merged 1 commit into from
Nov 18, 2023

Conversation

jchv
Copy link
Contributor

@jchv jchv commented Nov 16, 2023

  • Update steps to latest action versions
  • Use GitHub script (Node.JS + Octokit.js) step to:
    • Try to delete old release.
    • Try to delete old tag.
    • Create new nightly tag for release.
  • Use softprops/action-gh-release to actually create the releases.
    • GitHub has officially recommended this action in the deprecated official upload-release-asset action.
    • It seems like what it does is complicated enough to warrant actually using a third-party action instead of rolling our own.

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
Copy link
Contributor

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
Copy link
Contributor Author

jchv commented Nov 16, 2023

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.)

@Screwtapello Screwtapello merged commit 40486d6 into bsnes-emu:master Nov 18, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants