XF 2.3 Github build-release action

QuackieMackie

Active member
Has anyone here created a GitHub Action that automatically builds and packages XenForo add-ons for release?

I’ve been managing several add-ons recently, and manually building each release is starting to become a bit of a pain point, I keep forgetting to run the command and just skipping versions (totally my fault). I am aware I could just create a local .git hook that runs the command with each push but long term the action would be better.

A CI/CD workflow that builds the add-on .zip automatically when pushing a new release tag would make the process far smoother.

If something like this already exists, I’d love to check it out. If not, I’m considering creating one. (Never done it before but I'm up for it)
 
I explored the build process and from what I can see, it would be impossible to replicate the build-release command as a github action sadly as the the command php cmd.php xf-addon:export Vendor/Addon requires access to the database in order to convert the _output dir into the _data release version.

This means we could create a hook that performs that command before being commited to the repo then write a script that does the usual build release process (as the rest of the process doesn't require database connection to my knowledge).

But that still takes aware the clean process I wanted.

I found this in the suggestion section https://xenforo.com/community/threa...without-needing-a-full-xf-environment.187253/ shame it's been closed as I could see a real use for this and any other dev using github for their source code.



What I was trying to do
The goal was to create a action that you'd pass these variables into:
  • Addon ID – the unique identifier for the add-on.
  • Addon path – the path to your project files. This is important for repositories where the repo isn’t in the root directory of the add-on, instead the repo has the add-on in /src/addons/Vendor/Addon.
From there, the workflow could follow the same pipeline as the standard build-release command, copying files, generating hashes, processing build.json, and creating the release ZIP.
 
Back
Top Bottom