Jump to content

GitHub Action that will build a pyromod


Recommended Posts

20 hours ago, smiley said:

Perhaps a brief tutorial on this thread is warranted for those unfamiliar with Github actions.

I can try to make things a bit more clear, but I'm not sure a tutorial is warranted at this point. There's already docs on building a pyromod, github actions, and docker.


So... this thread is intended for anyone who hosts a mod on GitHub and want a bit of convenience when doing a release. Or this thread is intended for anyone thinking about hosing a mod on GitHub. People who don't use GitHub to mod will have no use for this action and can safely ignore this thread. :)


The docs for using the Action on the repo README. It assumes the root directory of your mod is in the repo root (e.g., the repo root is where 'mod.json' is located) When the action runs, it will create the mod using the pyrogenesis archive builder as shown here, and output the resulting .pyromod file to $PWD/output. An example is shown on the README on how to access it so it can be used in a separate release action. The release action shown in the example is not required to use the gh-action-build-pyromod action (there are other release actions available on GitHub that can be used instead, if you prefer)


20 hours ago, andy5995 said:

The Dockerfile I'm using for the Action is at 0ad-matters/0ad-bin-nodata

No technical knowledge of Docker is needed to use the Action. I posted this for anyone who is curious about the docker image used "behind-the-scenes" for the action, or for anyone who wants to "audit" how the image is created, or make a PR to improve upon it.


I'd be happy to answer any specific questions related to the Action.

How's that @smiley? ;)

Link to comment
Share on other sites

I think i got lost in so m any link and not sure what to do, (sorry im new to github and never used this things so maybe "more newbie text would be great" 

My understanding is this should create pyromod from provided source somehow automatically.


I created mentioned yml file https://github.com/Kampot-0ad/customrating/blob/main/.github/workflows/create_pyromod.yml

Now I can see in "action" menu new workflow "Build Pyromod" but no idea how to execute it.




- Do I need to edit anything in "Releases" or "Packages"? There is Publish your first package



Link to comment
Share on other sites

10 minutes ago, Stan` said:

You only have v0.26.1 as tag so you need to use that.

Does not ring the bell, it seems to me it tries to use some "uses" outside of my github. my product tags does not matter I guess otherwise this automation would not make sense.

name: Release PyroMod
uses: ncipollo/release-action@v1.1   <--- HERE IS PROBLEM
allowUpdates: True
prerelease: False
artifacts: "output/${{ env.MOD_NAME }}*.*"
token: ${{ secrets.GITHUB_TOKEN }}
omitNameDuringUpdate: True
omitBodyDuringUpdate: True
Link to comment
Share on other sites

49 minutes ago, Kampot said:

Does not ring the bell, it seems to me it tries to use some "uses" outside of my github. my product tags does not matter I guess otherwise this automation would not make sense.


@KampotI made a couple mistakes in my docs. The release action should be 'ncipollo/release-action@v1` not `ncipollo/release-action@v1.1`


Link to comment
Share on other sites

@KampotI'm glad you got it working!


5 hours ago, Kampot said:

It works, thanks. Now I would love to understand how it really works :)

Since you're new to GitHub, I can understand how it could be confusing. It's the very first github action I made, and I've been using GitHub for several years.


I know you've already looked at the files in the build-pyromod repo. If you look at some of the links in the README, it might help you understand better.


They key element is the use of docker with the action. Note that Docker isn't required to make an action, but it can be very helpful.


If at some point you have some specific questions about how it's done, feel free to post here. Good luck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...