BuildStandardNpmEngineInstallSteps creates standard npm installation steps for engines. This helper extracts the common pattern shared by Copilot, Codex, and Claude engines. Parameters: - packageName: The npm package name (e.g., "@github/copilot") - defaultVersion: The default version constant (e.g
( packageName string, defaultVersion string, stepName string, cacheKeyPrefix string, workflowData *WorkflowData, )
| 69 | // Returns: |
| 70 | // - []GitHubActionStep: The installation steps including Node.js setup |
| 71 | func BuildStandardNpmEngineInstallSteps( |
| 72 | packageName string, |
| 73 | defaultVersion string, |
| 74 | stepName string, |
| 75 | cacheKeyPrefix string, |
| 76 | workflowData *WorkflowData, |
| 77 | ) []GitHubActionStep { |
| 78 | cooldownEnabled := resolveRuntimeCooldown(workflowData, "node") |
| 79 | return buildStandardNpmEngineInstallSteps(packageName, defaultVersion, stepName, cacheKeyPrefix, workflowData, cooldownEnabled) |
| 80 | } |
| 81 | |
| 82 | // BuildStandardNpmEngineInstallStepsNoCooldown creates standard npm installation |
| 83 | // steps for engines while forcing the default npm release-age cooldown off. |