Skip to content

GitHub Actions#85

Merged
RangerMauve merged 6 commits intoRangerMauve:masterfrom
James-E-A:master
Apr 27, 2021
Merged

GitHub Actions#85
RangerMauve merged 6 commits intoRangerMauve:masterfrom
James-E-A:master

Conversation

@James-E-A
Copy link
Copy Markdown
Contributor

This PR calls GitHub's free CI service whenever a push or a pull request is made. It additionally makes build artifacts available to download and take for a spin without ever having to set up a development environment on one's local machine.

Does it look appropriate?

Copy link
Copy Markdown
Owner

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look super useful. Thank you for putting in the effort. 😁

@RangerMauve
Copy link
Copy Markdown
Owner

Actually, is it possible to run this on tags and to upload the bundle to the release artifacts?

I've only ever used that functionality with electron-builder so I'm not sure how it works for regular node modules. 😅

@James-E-A
Copy link
Copy Markdown
Contributor Author

is it possible to run this on tags and to upload the bundle to the release artifacts

Preliminarily, it looks like that's not as trivial as one would like it to be: there are some 3rd-party scripts to do so, but it's not well-integrated…

Aha, I seem to have found this: https://github.com/softprops/action-gh-release

A common case for GitHub releases is to upload your binary after its been validated and packaged. Use the with.files input to declare a newline-delimited list of glob expressions matching the files you wish to upload to GitHub releases. If you'd like you can just list the files by name directly.

I haven't committed support for it just yet, but it looks like it'd be as simple as on: release

So, in any case, it should only formally attach artifacts to Release-tagged commits; but do you want me to have it build stuff for pushes and PRs anyway, for general CI purposes?


It looks like it will require some sort of token, once accepted:

The following are required as step.env keys:

GITHUB_TOKEN

@James-E-A
Copy link
Copy Markdown
Contributor Author

Hmm, actually, upon further inspection:

  • That Action can create releases, and attach files to those it is creating.

  • Actions, generally, can take action based off the creation of a Release (on: release), though it's not clear whether they can attach files to existing (or user-created) Releases.

It looks like, to leverage that Action to attach files to Releases automatically, you would also have to entrust it with the creation of Releases, which would probably entail having a separate release branch that you push to (which may be a nontrivial change to your workflow.)

I will have to do a bit more research into the options for automatically attaching build artifacts to Releases. (Though, as currently drafted, this PR would enable "simply" downloading the Artifact associated with a commit and attaching it to its associated Release manually.)

@RangerMauve
Copy link
Copy Markdown
Owner

@JamesTheAwesomeDude I can supply the GH token for this, sure.

but do you want me to have it build stuff for pushes and PRs anyway, for general CI purposes?

Your call on what you think would be useful for folks. 😁

It looks like, to leverage that Action to attach files to Releases automatically, you would also have to entrust it with the creation of Releases,

Can it detect new tags to create releases? That's what electron-builder does in Agregore

Also, if you're not interested in messing around with the release stuff I'm okay with leaving it as a TODO and doing the PR based build artifact thing in the meantime. There's no pressure either way of course. 😁

Copy link
Copy Markdown
Owner

@RangerMauve RangerMauve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good as is. 😁 Any fancier stuff can be added in later PRs.

Thank you so much for working on this.

@RangerMauve RangerMauve marked this pull request as ready for review April 27, 2021 18:59
@RangerMauve RangerMauve merged commit d360980 into RangerMauve:master Apr 27, 2021
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