Skip to main content

GitHub Action

Scaffold a bundled GitHub Action that runs on Node 24 and exposes a typed greeting input and output.

Why Use This Command?

  1. Creates the repository-level action.yml and its package source together so their entry paths cannot drift.
  2. Bundles dependencies with NCC so consumers can execute the checked-in build/index.js without installing packages.
  3. Includes Vitest and GitHub's local-action runner so logic can be checked before publishing a tag.

Requirements

  • Node.js runtime — Use any Node.js LTS release.
  • Repository root ownership — The command writes action.yml at 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

FlagDescription
-d, --dry-runRun without writing any files.
--name <name>Project slug when creating a new monorepo; omit at an existing root.
--non-interactiveRequire every answer as a flag and do not open prompts.
--workspace-name <name>Workspace directory and package name.
--output <dir>Output directory.

Output Files

FileDescription
action.ymlRoot action metadata using the generated package build.
src/index.tsAction entry point with failure reporting.
src/run.tsImport-safe action logic and output generation.
src/run.test.tsVitest smoke test for the action logic.
package.jsonGitHub toolkit dependencies, local runner, and NCC build.

Non-Interactive Mode

bash
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.