In affinity go to Window -> Library, then in the Library tap use the drop down in the top right to install the macro file.
Make sure your desired channel content are in groups titled R, G, B and/or A, appropriately. RGB are all required for RGB packing, but leaving a group empty or with a blank layer should be fine. The most effecient way to use this macro is probably to set this formatting up in a template document you can open, use Place to link elements from their own documents into each group, then save as. This way you can live-edit each element and simply flip back to this document to re-export. Just click the macro of your choosing (currently either RGB or RGBA) to run.
If channels are out of order or potentially blank, chances are you ran the macro with existing Spare Channels. Check the channels tab, and delete any channels with a trashcan delete icon first, then try again.