Creating an action
Use the generator to create a GitHub Action scaffold and register it for releases:
pnpm gen:actionThe generator asks for a folder name, display name, and one-line description. Use a new kebab-case folder name under actions/; the display name defaults to the folder name with spaces and the first letter of each part capitalized. You can provide all three answers in one command:
pnpm gen:action --args my-action "My Action" "Does something useful"What the generator sets up
Inside actions/<folder>/, the generator creates action.yml for a JavaScript action that runs src/index.mjs on GitHub's Node 24 runtime. It also adds a runnable placeholder and smoke test in src/index.mjs and src/index.test.mjs. There is no separate compilation or bundling step.
It also creates a README, CHANGELOG.md, and version.txt. The README contains generated input and output tables based on action.yml; when the action has no inputs or outputs, it says so explicitly. The generator registers the action in Release Please's configuration and manifest, and adds it to the Actions table in the root README. It formats the scaffold and release files, but does not commit them.
Each action has its own release history. The generator pins its first Release Please release to 0.0.1, while the initial manifest and version.txt start at 0.0.0. Release tags use the action folder name, such as my-action-v0.0.1; later action releases are independent of plugin and other action releases.
Finish the action
- Declare inputs and outputs in
action.yml, including descriptions that will make sense to someone configuring the action. The README tables are generated from this metadata, so don't edit those tables by hand. - Read inputs and write outputs with the shared
getInput()andsetOutput()helpers from../../common/src/utils.mjs. Pass the exact input name fromaction.ymltogetInput(), such asgetInput('plugin-name'). GitHub keeps hyphens in input environment variable names, soplugin-namebecomesINPUT_PLUGIN-NAME, notINPUT_PLUGIN_NAME. See the warning in CI and releases. - Implement and test the behavior in
src/index.mjsandsrc/*.test.mjs. Tests live beside the implementation, and CI tests the actions selected by the changes in your pull request. - Finish the README with a human-written overview and usage examples. Then run
pnpm readmeto refresh the generated input/output tables, reference links, and root Actions table. Usepnpm readme:checkto check for generated-documentation drift.
You can use the action by its folder path and action-specific release tag:
steps:
- uses: filiphsps/pumpkin-plugins/actions/my-action@my-action-v0.0.1GitHub does not automatically list action metadata files nested inside a monorepo in the Marketplace. For the release setup and other publishing details, see CI and releases.