angular-cli/docs/process/release.md
Joey Perrott 3d76cef369 build: add caretaker configuration to ng-dev config
Add the caretaker configuration to set up being able to run both the carataker
check and the handoff commands.

The caretaker handoff command will operate using the angular-cli-caretaker group
which has already been seeded with the current information.
2022-05-23 14:53:55 -07:00

4.9 KiB

Setting Up Local Repository

  1. Clone the Angular-CLI repo. A local copy works just fine.
  2. Create an upstream remote:
$ git remote add upstream https://github.com/angular/angular-cli.git

Caretaker

The caretaker should triage issues, merge PR, and sheppard the release.

Caretaker calendar can be found here.

Each shift consists of two caretakers. The primary caretaker is responsible for merging PRs to main and patch whereas the secondary caretaker is responsible for the release.

At the end of each caretaker's rotation, they should peform a handoff in which they provide information to the next caretaker about the current state of the repository and update the access group to now include the next caretaker and their secondary. To perform this update to the access group, the caretaker can run:

$ yarn ng-dev caretaker handoff

Merging PRs

The list of PRs which are currently ready to merge (approved with passing status checks) can be found with this search. This list should be checked daily and any ready PRs should be merged. For each PR, check the target label to understand where it should be merged to. You can find which branches a specific PR will be merged into with the yarn ng-dev pr check-target-branches <pr> command.

When ready to merge a PR, run the following command:

yarn ng-dev pr merge <pr>

Maintaining LTS branches

Releases that are under Long Term Support (LTS) are listed on angular.io.

Since there could be more than one LTS branch at any one time, PR authors who want to merge commits into LTS branches must open a pull request against the specific base branch they'd like to target.

In general, cherry picks for LTS should only be done if it meets one of the criteria below:

  1. It addresses a critical security vulnerability.
  2. It fixes a breaking change in the external environment. For example, this could happen if one of the dependencies is deleted from NPM.
  3. It fixes a legitimate failure on CI for a particular LTS branch.

Release

Releasing is performed using Angular's unified release tooling. Each week, two releases are expected, latest and next on npm.

For a minor OR major release:

After FW releases -rc.0 for an upcoming minor/major version, update the corresponding version in latest-versions.ts and peer dependencies on FW (here and here) to match. This ensures that CLI -rc.0 depends on FW -rc.0.

The same needs to be done for a -next.0 release, and needs to be done for both minor and major releases.

Once FW releases the actual minor/major release (for example: 13.0.0 or 13.1.0), these versions should be updated to match (remove -rc.0 and -next.0). This can be done as part of the release PR (example) or a separate PR after FW releases but before CLI releases.

For a major release:

When a release is transitioning from a prerelease to a stable release, the semver ranges for Angular dependencies within the packages' package.json files will need to be updated to remove the prerelease version segment. For example, "@angular/compiler-cli": "^13.0.0 || ^13.0.0-next" in a prerelease should become "@angular/compiler-cli": "^13.0.0" in the stable release. The current packages that require adjustment are:

Releasing the CLI

Typical patch and next releases do not require FW to release in advance, as CLI does not pin the FW dependency.

After confirming that the above steps have been done or are not necessary, run the following and navigate the prompts:

yarn ng-dev release publish

Changing shifts

If you need to update the caretaker calendar to modify shifts, make sure you are logged in as your @angular.io account and click the "+ Google Calendar" button in the bottom right to add it to your Google Calendar account. You should then be able to find and modify events on calendar.google.com. The calendar is a part of the angular.io organization, so events can only be modified by users in the same organization.