I'm developing a simple GitHub Action with TypeScript that installs in PATH the ANTLR 4 jar executable, also adding a specific environment variable used by a .NET build task.
It works, but I was thinking about adding also bash/batch/powershell scripts for a more straightforward usage of the tool. Both official ANTLR website and GitHub repo document some example scripts for each platform, but there is no official downloadable scripts provided. I already adapted the examples to the Action setup in the README of my repo, and I was now thinking about bundling them with the Action.
I was wondering which could be the best way to bundle the scripts:
Add the scripts directly to the
distfolder and distribute it along with the compiled JS file; after that, I could simply use@actions/ioto copy those files to tool cache folder generated by@actions/tool-cache.I like this idea but I don't know if it is considered a bad practice to bundle other files along with the JS script, because they would be pulled each time the action is used.
Add the scripts as strings inside TypeScript code and use
@actions/execto generate scripts inside the tool cache folder.I really don't like this idea because I find it unmaintainable.
Download the scripts from a GitHub repository, which could be, the repo of the Action, maybe from the same tag of the running version, or a dedicated repo or a Gist.
Also, I could possibly open an Issue against ANTLR official repo to check if there is any interest about adding an official script location.
What is in general the preferred way to bundle shell scripts with a GitHub Action, and which is the most viable choice for my specific problem?