Skip to content

Commit f9209e2

Browse files
chore(rover): adds step to fetch updated tags before a release (#410)
Co-authored-by: Irina Shestak <shestak.irina@gmail.com>
1 parent 6c4a612 commit f9209e2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

RELEASE_CHECKLIST.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ If you are releasing a beta or a release candidate, no official changelog is nee
1818
1. Go through the closed PRs in the milestone. Each should have a changelog
1919
label indicating if the change is documentation, feature, fix, or maintenance. If
2020
there is a missing label, please add one. If it is a breaking change, also add a changelog - BREAKING label.
21-
1. Choose an emoji for the release. Try to make it semi-related to something that's been included in the release.
2221
1. Add this release to the `CHANGELOG.md`. Use the structure of previous
2322
entries.
2423

@@ -52,6 +51,7 @@ This part of the release process is handled by GitHub Actions, and our binaries
5251

5352
1. Have your PR merged to `main`.
5453
1. Once merged, checkout `main` branch locally and pull latest changes.
54+
1. Sync your local tags with the remote tags by running `git tag -d $(git tag) && git fetch --tags`
5555
1. Tag the commit by running either `git tag -a v#.#.# -m "#.#.#"` (release), or `git tag -a v#.#.#-rc.# -m "#.#.#-rc.#"` (release candidate)
5656
1. Run `git push --tags`.
5757
1. Wait for CI to pass.
@@ -63,7 +63,7 @@ After CI builds the release binaries and they appear on the [releases page](http
6363
#### If this is a stable release (not a release candidate)
6464

6565
1. Paste the current release notes from `CHANGELOG.md` into the release body.
66-
1. Update the *title* of the release (not the tag itself) to include the emoji for the current release
66+
1. Update the _title_ of the release (not the tag itself) to include the emoji for the current release
6767
1. Be sure to add any missing link definitions to the release.
6868

6969
#### If this is a release candidate
@@ -96,7 +96,7 @@ We don't publish release candidates to crates.io because they don't (as of this
9696

9797
Full releases are tagged `latest`. Release candidates are tagged `beta`. If for some reason you mix up the commands below, follow the troubleshooting guide.
9898

99-
1. If this is a full release, `cd installers/npm && npm publish`.
99+
1. If this is a full release, `cd installers/npm && npm publish`.
100100
1. If it is a release candidate, `cd installers/npm && npm publish --tag beta`
101101

102102
## Troubleshooting a release
@@ -107,49 +107,49 @@ Mistakes happen. Most of these release steps are recoverable if you mess up.
107107

108108
Tags and releases can be removed in GitHub. First, [remove the remote tag](https://stackoverflow.com/questions/5480258/how-to-delete-a-remote-tag):
109109

110-
``` console
110+
```console
111111
git push --delete origin vX.X.X
112112
```
113113

114114
This will turn the release into a `draft` and you can delete it from the edit page.
115115

116116
Make sure you also delete the local tag:
117117

118-
``` console
118+
```console
119119
git tag --delete vX.X.X
120120
```
121121

122122
## I forgot to add the `beta` tag to my RC when I ran `npm publish`
123123

124124
Never fear! We can fix this by updating npm tags. First, add a beta tag for the version you just published:
125125

126-
``` console
126+
```console
127127
npm dist-tag add @apollo/rover@x.x.x-rc.x beta
128128
```
129129

130130
once you add the beta tag, you can list your tags
131131

132-
``` console
132+
```console
133133
npm dist-tag ls @apollo/rover
134134
```
135135

136136
You should now see two tags pointing to the version you just pushed; for example if you had tried to push v0.1.0-rc.0:
137137

138-
``` console
138+
```console
139139
$ npm dist-tag ls @apollo/rover
140140
beta: 0.1.0-rc.0
141141
latest: 0.1.0-rc.0
142142
```
143143

144144
Go back to the Changelog or GitHub releases, find the _actual_ latest version, and re-tag it as latest:
145145

146-
``` console
146+
```console
147147
npm dist-tag add @apollo/rover@x.x.x latest
148148
```
149149

150150
List tags again and you should see the latest restored, and your new release candidate as beta (e.g. 0.1.0-rc.0 is beta and 0.0.0 was last stable version)
151151

152-
``` console
152+
```console
153153
npm dist-tag ls @apollo/rover
154154
beta: 0.1.0-rc.0
155155
latest: 0.0.0

0 commit comments

Comments
 (0)