mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +08:00
docs: update release documentation
This commit is contained in:
parent
0346d6953e
commit
b2ce610b24
@ -53,136 +53,12 @@ In general, cherry picks for LTS should only be done if it meets one of the crit
|
||||
|
||||
# Release
|
||||
|
||||
For each version to be released, check out the associated branch and:
|
||||
Releasing is performed using Angular's unified release tooling. Each week, two releases are expected, `latest` and `next` on npm.
|
||||
|
||||
1. Increment the CLI version number in
|
||||
[`package.json`](https://github.com/angular/angular-cli/blob/master/package.json).
|
||||
1. Update `Angular` version in
|
||||
[`packages/schematics/angular/utility/latest-versions.ts`](https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/latest-versions.ts)
|
||||
to match the lastest framework patch version for the associated minor.
|
||||
- This number _usually_ aligns with the CLI version **but not always**. Framework may have
|
||||
required a hotfix release, which could desync the two version numbers. Check the latest version
|
||||
with `yarn info @angular/core dist-tags` or look at the most recent FW release in the
|
||||
[#news channel](https://angular-team.slack.com/archives/C0439GUGA).
|
||||
To perform a release run the following and navigate the prompts:
|
||||
|
||||
As commits are cherry-picked when PRs are merged, creating the release should be a matter of creating a tag.
|
||||
|
||||
```bash
|
||||
git add packages/schematics/angular/utility/latest-versions.ts package.json
|
||||
git commit -m 'release: vXX'
|
||||
git tag -a 'vXX' -m 'release: tag vXX'
|
||||
```
|
||||
|
||||
The package versions we are about to publish are derived from `version` in the root
|
||||
[`package.json`](https://github.com/angular/angular-cli/blob/master/package.json#L3). Double check that the versions are correct by running the
|
||||
following command.
|
||||
|
||||
```bash
|
||||
yarn admin packages --releaseCheck
|
||||
```
|
||||
|
||||
Now push the commit and the tag to the upstream repository. **Make sure to use
|
||||
`--follow-tags`, as tags need to be pushed immediately or CI may fail!**
|
||||
|
||||
```bash
|
||||
git push upstream --follow-tags
|
||||
```
|
||||
|
||||
## Authenticating
|
||||
|
||||
**This can ONLY be done by a Google employee.**
|
||||
|
||||
Log in to the Wombat publishing service using your own github and google.com
|
||||
account to publish. This enforces the login is done using 2Factor auth.
|
||||
|
||||
Run `npm login --registry https://wombat-dressing-room.appspot.com`:
|
||||
|
||||
1. In the new browser tab, the registry app will ask you to connect with GitHub to create a token
|
||||
1. After connecting with github, you will be redirected to create a token
|
||||
1. Upon redirect, an auth token is added to your ~/.npmrc for the proxy
|
||||
|
||||
After closing the tab, you have successfully logged in, it is time to publish.
|
||||
|
||||
**NOTE: After publishing, remove the token added to your `~/.npmrc` file to logout.**
|
||||
|
||||
## Publishing
|
||||
|
||||
**This can ONLY be done by a Google employee.**
|
||||
|
||||
**Wait for CI to be green after pushing the release commit.**
|
||||
|
||||
For the first release of a major version, follow the instructions in
|
||||
[Publishing a Major Version](#publishing-a-major-version) section.
|
||||
|
||||
For non-major release, check out the patch branch (e.g. `9.1.x`), then run:
|
||||
|
||||
```bash
|
||||
rm -rf node_modules/ && yarn install --frozen-lockfile # Reload dependencies
|
||||
yarn admin publish --tag latest
|
||||
```
|
||||
|
||||
If also publishing a prerelease, check out `master`, then run:
|
||||
|
||||
```bash
|
||||
rm -rf node_modules/ && yarn install --frozen-lockfile # Reload dependencies
|
||||
yarn admin publish --tag next
|
||||
```
|
||||
|
||||
If also publish an LTS branch, check out that patch branch (e.g. `8.3.x`), then
|
||||
run:
|
||||
|
||||
**Make sure to update the NPM tag for the version you are releasing!**
|
||||
|
||||
```bash
|
||||
rm -rf node_modules/ && yarn # Reload dependencies
|
||||
yarn admin publish --tag v8-lts
|
||||
```
|
||||
|
||||
## Release Notes
|
||||
|
||||
`yarn run -s admin changelog` takes `from` and `to` arguments which are any valid git
|
||||
ref.
|
||||
|
||||
For example, running the following command will output the release notes on
|
||||
stdout between v1.2.3 and 1.2.4:
|
||||
|
||||
```bash
|
||||
yarn run -s admin changelog --from=v1.2.3 --to=v1.2.4
|
||||
```
|
||||
|
||||
Copy the output (you can use `| pbcopy` on MacOS or `| xclip` on Linux) and
|
||||
paste the release notes on [GitHub](https://github.com/angular/angular-cli/releases)
|
||||
for the tag just released.
|
||||
|
||||
If you have an API token for GitHub you can create a draft automatically by
|
||||
using the `--githubToken` flag. You just then have to confirm the draft.
|
||||
|
||||
> **Tags containing `next` or `rc` should be marked as pre-release.**
|
||||
|
||||
## Post-release
|
||||
|
||||
Don't forget to update the Slack [#tools](https://angular-team.slack.com/archives/C46U16D4Z) channel
|
||||
topic with the next caretaker shift from the
|
||||
[calendar](https://calendar.google.com/calendar/embed?src=angular.io_jf53juok1lhpm84hv6bo6fmgbc%40group.calendar.google.com&ctz=America%2FLos_Angeles).
|
||||
|
||||
## Publishing a Major Version
|
||||
|
||||
For the first release of a major version, say `v10.0.0`, checkout the major branch
|
||||
(i.e. `10.0.x`), then run:
|
||||
|
||||
```bash
|
||||
yarn # Reload dependencies
|
||||
yarn admin publish --tag next # a major release is always tagged as next initially
|
||||
```
|
||||
|
||||
Confirm with downstream repositories (Components, etc) that everything is ok.
|
||||
Once the release is stable, wait for Framework to retag their packages, then
|
||||
retag the CLI packages as `latest`.
|
||||
The command below will automatically retag stable packages as well as experimental
|
||||
packages.
|
||||
|
||||
```bash
|
||||
yarn admin dist-tag --version 10.0.0 --tag latest
|
||||
```sh
|
||||
yarn ng-dev release publish
|
||||
```
|
||||
|
||||
## Changing shifts
|
||||
|
Loading…
x
Reference in New Issue
Block a user