GitHub Action
Scaffold a bundled GitHub Action that runs on Node 24 and exposes a typed greeting input and output.
Why Use This Command?
- Creates the repository-level
action.ymland its package source together so their entry paths cannot drift. - Bundles dependencies with NCC so consumers can execute the checked-in
build/index.jswithout installing packages. - Includes Vitest and GitHub's local-action runner so the source action can be exercised before publishing a tag.
- Starts with grouped GitHub logs, a named output, and a concise job summary without echoing raw input values.
Requirements
- Node.js runtime — Use any Node.js LTS release.
- Repository root ownership — The command writes
action.ymlat the monorepo root and stops if that file already exists. - Empty directory or monorepo root — Nova auto-detects whether to create a project or add a package.
Usage
Options
| Flag | Description |
|---|---|
-d, --dry-run | Run without writing any files. |
--install | Install dependencies after scaffolding; this is the default. |
--no-install | Skip dependency installation. |
--name <name> | Project slug when creating a new monorepo; omit at an existing root. |
--non-interactive | Require every answer as a flag and do not open prompts. |
--workspace-name <name> | Workspace directory and package name. |
--output <dir> | Output directory. |
Output Files
| File | Description |
|---|---|
action.yml | Root action metadata using the generated package build. |
.env | Untracked Nova defaults and the local action input. |
.env.sample | Shareable Nova defaults with an example INPUT_NAME value. |
src/index.ts | Action entry point with failure reporting. |
src/run.ts | Import-safe action logic and output generation. |
src/run.test.ts | Vitest smoke test for the action logic. |
package.json | GitHub toolkit dependencies, local runner, and NCC build. |
Local Development
Set INPUT_NAME in the generated .env, then run npm run dev from the action workspace. The command passes the TypeScript run() module and environment file to GitHub's local-action runner.
The local runner targets source because it replaces GitHub Actions Toolkit dependencies while the action executes. Run npm run build separately to produce the NCC bundle that consumers execute.
The action writes a job summary on GitHub. Local runners that do not expose GITHUB_STEP_SUMMARY receive a clear informational message and continue successfully.
Non-Interactive Mode
nova scaffold package github-action --non-interactive --name my-action --workspace-name my-action --output ./my-action
nova scaffold package github-action --non-interactive --workspace-name my-action --output ./packages/my-action
Registration
Nova registers the workspace with the package role and distributable policy. The generated action.yml uses ./packages/{workspaceName}/build/index.js, so a custom output path is also added to the root npm workspace list when needed.
Nova also registers a same-named file artifact with action.yml at its root and the bundled JavaScript under action/. The generated publish workflow can hand that exact assembled tree to the action release job.