Skip to content

Commit 274673a

Browse files
dgp1130alan-agius4
authored andcommitted
ci: update release docs to use annotated tags for releases
This changes from using lightweight tags to annotated tags. The later includes author, time, and message information that is lacking from the former. It is also included in Git's `--follow-tags` option. This should allow us to push tags alongside release commits more atomically and hopefully eliminate or at least reduce the possibility of a race condition arising from CI starting on the release commit before the associated tag is pushed. Such a state causes CI failures, because they take the latest version from the most recent `v*` tag. (cherry picked from commit 55e19aa)
1 parent 7b1109f commit 274673a

File tree

1 file changed

+40
-6
lines changed

1 file changed

+40
-6
lines changed

docs/process/release.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ merge commits into LTS branches must open a pull request against the specific ba
8888
In general, cherry picks for LTS should only be done if it meets one of the criteria below:
8989

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

@@ -108,11 +108,22 @@ As commits are cherry-picked when PRs are merged, creating the release should be
108108

109109
```bash
110110
git commit -a -m 'release: vXX'
111-
git tag 'vXX'
111+
git tag -a 'vXX' -m 'release: tag vXX'
112+
```
113+
114+
The package versions we are about to publish are derived from the git tag that
115+
we just created. Double check that the versions are correct by running the
116+
following command.
112117

113-
# Make sure to run these commands together, as missing tags can cause CI
114-
# failures.
115-
git push upstream && git push upstream --tags
118+
```bash
119+
yarn admin packages --version
120+
```
121+
122+
Now push the commit and the tag to the upstream repository. **Make sure to use
123+
`--follow-tags, as tags need to be pushed immediately or CI may fail!**
124+
125+
```bash
126+
git push upstream --follow-tags
116127
```
117128

118129
### Authenticating
@@ -138,7 +149,10 @@ After closing the tab, you have successfully logged in, it is time to publish.
138149

139150
**It is a good idea to wait for CI to be green on the patch branch and tag before doing the release.**
140151

141-
Check out the patch branch (e.g. `9.1.x`), then run:
152+
For the first release of a major version, follow the instructions in
153+
[Publishing a Major Version](#publishing-a-major-version) section.
154+
155+
For non-major release, check out the patch branch (e.g. `9.1.x`), then run:
142156
```bash
143157
yarn # Reload dependencies
144158
yarn admin publish --tag latest
@@ -205,3 +219,23 @@ If you don't have the firebase CLI installed, you can install it using
205219
`npm install --global firebase-tools` (or use your package manager of choice).
206220

207221
This is detailed in [`etc/cli.angular.io/README.md`](https://github.com/angular/angular-cli/blob/master/etc/cli.angular.io/README.md).
222+
223+
## Publishing a Major Version
224+
225+
For the first release of a major version, say `v10.0.0`, checkout the major branch
226+
(i.e. `10.0.x`), then run:
227+
228+
```bash
229+
yarn # Reload dependencies
230+
yarn admin publish --tag next # a major release is always tagged as next initially
231+
```
232+
233+
Confirm with downstream repositories (Components, etc) that everything is ok.
234+
Once the release is stable, wait for Framework to retag their packages, then
235+
retag the CLI packages as `latest`.
236+
The command below will automatically retag stable packages as well as experimental
237+
packages.
238+
239+
```bash
240+
yarn admin dist-tag --version 10.0.0 --tag latest
241+
```

0 commit comments

Comments
 (0)