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

v3

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@v3

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

Choose a version

GitHub Action - Match Angular Versions

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.x, 10.0.x. To check the full list of supported versions, see supported versions.

Example workflow - match Angular versions

name: Node.js CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [10.x, 12.x]
        angular-version:
          [
            6.0.x,
            6.1.x,
            7.0.x,
            7.1.x,
            7.2.x,
            8.0.x,
            8.1.x,
            8.2.x,
            9.0.x,
            9.1.x,
            10.0.x,
            10.1.x,
            10.2.x,
            11.0.x,
            11.1.x,
            11.2.x
            12.0.x
          ]

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

      - run: yarn install
      - 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.

  • 6.0.x,
  • 6.1.x,
  • 7.0.x
  • 7.1.x
  • 7.2.x
  • 8.0.x
  • 8.1.x
  • 8.2.x
  • 9.0.x
  • 9.1.x
  • 10.0.x
  • 10.1.x
  • 10.2.x
  • 11.0.x
  • 11.1.x
  • 11.2.x
  • 12.0.x

Contributing

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

Contributors

Thanks goes to these wonderful people (emoji key):


Nacho Vazquez

πŸ’¬ πŸ› πŸ’Ό πŸ’» πŸ“– πŸ’‘ πŸ€” πŸš‡ 🚧 πŸ“† πŸ‘€ πŸ›‘οΈ ⚠️ πŸ”§ πŸ““

Lars Gyrup Brink Nielsen

πŸ› πŸ’» πŸ“– πŸ’‘ πŸ€” πŸš‡ 🚧 πŸ§‘β€πŸ« πŸ“¦ πŸ”Œ πŸ‘€ ⚠️

Tim Deschryver

πŸ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

License

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