Stream: show and tell

Topic: GitHub actions for Roc


view this post on Zulip Hannes (Mar 09 2023 at 07:15):

Hi everyone, I've recently written two GitHub actions, one that installs Roc and the other bundles a Roc library. Neither of them are completely finished, but I've used them to automatically bundle and release an example library.

Here are the repos

and the example library is available here: Hasnep/roc-json-test-workflow, particularly this workflow which bundles the library when a new release is created.

The library can be used with this URL:

https://github.com/Hasnep/roc-json-test-workflow/releases/download/v1.0.0/3pE4Dif7tADb2_nutae5C9hFL5j32Ke31UQnsrg7OSE.tar.br

view this post on Zulip Brendan Hansknecht (Mar 09 2023 at 07:17):

really nice!

view this post on Zulip Richard Feldman (Mar 09 2023 at 13:05):

wow, love it!!! :heart_eyes:

view this post on Zulip Richard Feldman (Mar 09 2023 at 13:07):

one minor suggestion:

          # Path to the folder containing the library's main.roc
          library-path: path/to/src

you don't acutally have to name things main.roc, that's just the default name the CLI uses - so I'd suggest having this be the path to the actual .roc file itself, rather than assuming the roc file is named main.roc and having the path be to the directory :big_smile:

view this post on Zulip Richard Feldman (Mar 09 2023 at 13:08):

I wonder how hard it would be to expand it to release platforms too :thinking:

view this post on Zulip Richard Feldman (Mar 09 2023 at 13:11):

those are trickier because usually you'll have to do a separate build on each different operating system the platform wants to support, and then gather up those output binaries onto one machine which then runs roc build --bundle to put them all together and release that

view this post on Zulip Hannes (Mar 09 2023 at 13:33):

Thanks for the feedback, I'll update the inputs to reflect that:+1:

view this post on Zulip Hannes (Mar 09 2023 at 13:51):

Yep, platforms are next on my list, shouldn't be that much different, but will need some more involved configuration to run in all the different environments :/

view this post on Zulip Richard Feldman (Mar 09 2023 at 16:47):

indeed, but that will be incredibly valuable! Right now @Anton builds basic-cli by hand for all the different targets for every release, so having a GitHub Action which did that would be a massive time-saver for every platform author! :smiley:

view this post on Zulip Anton (Mar 10 2023 at 07:33):

Actually we already have a workflow for basic-cli releases, I just manually upload the final archive :)

view this post on Zulip Richard Feldman (Mar 10 2023 at 14:58):

oh awesome! :heart_eyes:

view this post on Zulip Richard Feldman (Mar 10 2023 at 14:58):

maybe with the two Actions combined, that last step can be automated too?

view this post on Zulip Anton (Mar 10 2023 at 15:03):

Well, you also need to choose the version number and write release notes too so the last step can't really be automated.
For clarity, with "I just manually upload the final archive" I meant in the github release.

view this post on Zulip Anton (Mar 10 2023 at 15:05):

Unless you've made a tag with the version number already and intelligently use your commits as release notes but that doesn't seem ideal in all cases


Last updated: Jul 06 2025 at 12:14 UTC