I'm currently developing a GitHub Action built with TypeScript, and I'm struggling to find good information on how they can be released onto the GitHub Marketplace. A couple places I've seen indicate that I can bundle my action into a single JavaScript file and attach it to my release, but others seem to say that I need to fully track my build directory so that GitHub can pull directly from it. What is the right way to do this? Are both valid methods?
When writing uses: user/action@tag_or_branch_or_sha
in .github/workflows/workflow.yml
, GitHub just uses the user/action
on that tag, branch or commit. See Using release management for actions
So attaching the bundled js to release won't work. And GitHub actually recommends the second approach. (See Creating a JavaScript action.)
To answer your title, it is possible to put bundled js to another branch, and tag or sha will work too. You can write some workflows for automatic build and push, workflow of my action for example.