Best practices for storing / organising shell scripts for workflow steps?

In many of the job steps in my workflow definitions, I use short shell invocations. They’ve been mostly “in-line” within the YAML, but I’ve reached the stage where I think it would be better to have them in their own (.sh) files, for two reasons:

  • I can test them independently and individually
  • I can benefit from my editor’s shell syntax highlighting and linting

Has anyone come to the same conclusion, and what’s more, come up with any best practices as to where in the repo to store them? In the .github/workflows/ directory directly? In another .hidden/ directory in the repo?

All thoughts welcome. Thanks!