Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
package

GitHub Action

Match Angular Versions

v1.1.1 Pre-release

Match Angular Versions

package

Match Angular Versions

Modifies the package.json with matching dependency versions for a given base Angular version

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Match Angular Versions

uses: ngworker/angular-versions-action@v1.1.1

Learn more about this action in ngworker/angular-versions-action

Choose a version

GitHub Action - Match Angular Versions

DISCLAIMER: THIS ACTION IS HIGHLY EXPERIMENTAL.

This GitHub Action (written in JavaScript) modifies the root package.json of a project and replaces the version of all Angular related dependencies for given base version.

ngworker

Usage

Pre-requisites

Create a workflow .yml file in your repositories .github/workflows directory. An example workflow is available below. For more information, reference the GitHub Help Documentation for Creating a workflow file.

Inputs

  • angular_version: The base Angular version used to match the dependency version. Ex: 8.0.0, 10.0.14. To check the full list of supported versions, see supported versions.

Example workflow - match Angular versions

name: Node.js CI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]
        angular-version: [8.0.0, 9.0.0, 10.0.0]

    steps:
      - uses: actions/checkout@v2
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}
      - name: Change to the right Angular version
        uses: ngworker/angular-versions-action@v1
        with:
          angular-version: ${{ matrix.angular-version }}

      - run: yarn
      - run: yarn lint
      - run: yarn build
      - run: yarn test

This example use the github matrix to build, lint and test your code against different versions of Angular. This should be specially useful for library authors.

Supported Angular versions

At the moment this actions supports a limited set of Angular versions listed below.

  • 8.0.0
  • 9.0.0
  • 10.0.0

Contributing

We would love you to contribute to @ngworker/angular-versions-action, pull requests are welcome! Please see the CONTRIBUTING.md for more information.

License

The scripts and documentation in this project are released under the MIT License