One step. Set up Node.js, cache your package manager, and install Angular CLI. Works with npm, yarn, and pnpm — no boilerplate required.
- uses: mayurrawte/github-angular-actions@v2Installs the latest Angular CLI on Node 22 with npm caching. Zero config.
| Input | Default | Description |
|---|---|---|
version |
latest |
Angular CLI version — e.g. 17.3.8, 18.0.0, or latest |
node-version |
22 |
Node.js version — e.g. 22, 20, 18 |
package-manager |
npm |
npm, yarn, or pnpm |
cache-dependency-path |
(repo root) | Lock file path for monorepos |
cache |
true |
Set to false to disable package manager caching |
| Output | Description |
|---|---|
cli-version |
Installed Angular CLI version, e.g. 17.3.8 |
steps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
- run: npm ci
- run: npm run buildsteps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
with:
version: '17.3.8'
node-version: '20'
- run: npm ci
- run: npm test -- --watch=false --browsers=ChromeHeadlessAngular 16 and above supports Jest as the test runner. No extra setup needed — just run your test command after the action:
steps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
with:
version: 'latest'
node-version: '22'
- run: npm ci
- run: npm test # runs Jest if configured via ng generate jeststeps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
with:
node-version: '22'
package-manager: 'pnpm'
- run: pnpm install
- run: pnpm buildsteps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
with:
node-version: '22'
package-manager: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn buildsteps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
with:
package-manager: 'npm'
cache-dependency-path: 'packages/app/package-lock.json'
- run: npm ci --workspace=packages/appsteps:
- uses: actions/checkout@v4
- uses: mayurrawte/github-angular-actions@v2
id: ng-setup
- run: echo "Running on Angular CLI ${{ steps.ng-setup.outputs.cli-version }}"| Feature | This action | actions/setup-node only |
|---|---|---|
| Installs Angular CLI globally | ✅ | ❌ |
| Specific CLI version | ✅ | ❌ |
| Node.js version selection | ✅ | ✅ |
| npm caching | ✅ | ✅ |
| pnpm caching | ✅ | ✅ (manual config) |
| yarn caching | ✅ | ✅ (manual config) |
| Monorepo lock file path | ✅ | ✅ (manual config) |
Exposes cli-version output |
✅ | ❌ |
| Zero config | ✅ | ❌ (need extra step) |
Use this action when @angular/cli is not in your devDependencies — common in legacy projects, shared runner setups, or anywhere you run ng directly in CI scripts.
MIT