1 | # Release Checklist
|
2 |
|
3 | This is a list of the things that need to happen during a release.
|
4 |
|
5 | ## Build a Release
|
6 |
|
7 | ### Prepare the Changelog
|
8 |
|
9 | 1. Open the associated milestone. All issues and PRs should be closed. If
|
10 | they are not you should reassign all open issues and PRs to future
|
11 | milestones.
|
12 | 1. Go through the commit history since the last release. Ensure that all PRs
|
13 | that have landed are marked with the milestone. You can use this to
|
14 | show all the PRs that are merged on or after YYY-MM-DD:
|
15 | `https://github.com/issues?q=repo%3Acloudflare%2Fkv-asset-handler+merged%3A%3E%3DYYYY-MM-DD`
|
16 | 1. Go through the closed PRs in the milestone.
|
17 | 1. Add this release to the `CHANGELOG.md`. Use the structure of previous
|
18 | entries. If you use VS Code, you can use [this snippet](https://gist.github.com/victoriabernard92/296c39721a3f4b171cb55c9ab9a65ec2) to insert new changelog sections. If it is a release candidate, no official changelog is needed, but testing instructions will be added later in the process.
|
19 |
|
20 | ### Start a release PR
|
21 |
|
22 | 1. Create a new branch "#.#.#" where "#.#.#" is this release's version (release) or "#.#.#-rc.#" (release candidate)
|
23 | 1. Push up a commit with the `CHANGELOG.md` changes. The commit message can just be "#.#.#" (release) or "#.#.#-rc.#" (release candidate)
|
24 | 1. Request review from the @cloudflare/workers-devexp team.
|
25 |
|
26 | ### Review
|
27 |
|
28 | Most of your comments will be about the changelog. Once the PR is finalized and approved...
|
29 |
|
30 | 1. If you made changes, squash or fixup all changes into a single commit.
|
31 | 1. Run `git push` and wait for CI to pass.
|
32 |
|
33 | ### Tag and build release
|
34 |
|
35 | 1. Once ready to merge, tag the commit by running either `git tag -a v#.#.# -m #.#.#`
|
36 | 1. Run `git push --tags`.
|
37 | 1. Wait for CI to pass.
|
38 |
|
39 | ### Edit the release
|
40 |
|
41 | Draft a new release on the [releases page](https://github.com/cloudflare/kv-asset-handler/releases) and update release notes.
|
42 |
|
43 | ### Publish to npm
|
44 |
|
45 | Full releases are tagged `latest`. If for some reason you mix up the commands below, follow the troubleshooting guide.
|
46 |
|
47 | 1. If this is a full release, `cd npm && npm publish`. If it is a release candidate, `cd npm && npm publish --tag beta`
|
48 | 1. Tweet.
|
49 |
|
50 | # Troubleshooting a release
|
51 |
|
52 | Mistakes happen. Most of these release steps are recoverable if you mess up. The goal is not to, but if you find yourself cursing a fat fingered command, here are some troubleshooting tips. Please feel free to add to this guide.
|
53 |
|
54 | ## I pushed the wrong tag
|
55 |
|
56 | Tags and releases can be removed in GitHub. First, [remove the remote tag](https://stackoverflow.com/questions/5480258/how-to-delete-a-remote-tag):
|
57 |
|
58 | ```console
|
59 | git push --delete origin tagname
|
60 | ```
|
61 |
|
62 | This will turn the release into a `draft` and you can delete it from the edit page.
|
63 |
|
64 | Make sure you also delete the local tag:
|
65 |
|
66 | ```console
|
67 | git tag --delete vX.X.X
|
68 | ```
|