Creating an action
sh
pnpm gen:actionThis runs the action Turborepo generator in turbo/generators/. It asks for the action's folder name, display name and one-line description. To pass those answers directly:
sh
pnpm gen:action --args my-action "My Action" "Does something useful"The folder name uses kebab-case and must not exist under actions/ already. The generator prompts for all three values; the display name defaults to a title-cased folder name.
What it creates
actions/<folder>/action.yml, a Node 24 JavaScript action that runssrc/index.mjswithout a compilation or bundling step.src/index.mjswith a runnable placeholder andsrc/index.test.mjswith a co-located smoke test. SharedgetInput()andsetOutput()helpers, with regression tests for GitHub's input names and output-file format, live once inactions/common/src/.- A
README.md,CHANGELOG.mdandversion.txt, initialized to0.0.0. The README's Inputs and Outputs tables are generated fromaction.yml; its docs-site reference link is generated from the action folder and metadata. Actions with no declared values get an explicit “no inputs/outputs” note. - Entries in
release-please-config.jsonand.release-please-manifest.json. The action's first release is pinned to0.0.1, and later releases get independent<folder>-v<version>tags. - A row in the Actions table in the root
README.md, plus generated API reference links in the action README.
The generator formats the files after creating them. It does not commit anything.
Next steps
- Add inputs and outputs to
action.yml. ImportgetInputandsetOutputfrom../../common/src/utils.mjsinsrc/index.mjs; GitHub preserves hyphens in names such asINPUT_PLUGIN-NAME. See the warning in CI and releases. - Document input and output descriptions in
action.yml. Do not edit the generated README tables directly;pnpm readmeregenerates them andpnpm readme:checkchecks them for drift. - Implement the action in
src/index.mjsand cover its behavior insrc/*.test.mjs. Action tests live beside their implementation and CI runs tests only for the changed action. - Update the README's hand-written overview and usage examples, then run
pnpm readmeto generate its input/output tables and docs-site reference link and refresh the root action table.
Each action has an independent GitHub release and can be referenced by its subdirectory path. GitHub does not automatically list action metadata files nested in a monorepo in the Marketplace; see CI and releases for the release setup.