|
| 1 | +# Release Checklist |
| 2 | + |
| 3 | +These steps assume that you've checked out the Litep2p repository and are in the root directory of it. |
| 4 | + |
| 5 | +We also assume that ongoing work done is being merged directly to the `master` branch. |
| 6 | + |
| 7 | +1. Ensure that everything you'd like to see released is on the `master` branch. |
| 8 | + |
| 9 | +2. Create a release branch off `master`, for example `release-v0.3.0`. Decide how far the version needs to be bumped based |
| 10 | + on the changes to date. If unsure what to bump the version to (e.g. is it a major, minor or patch release), check with the |
| 11 | + Parity Networking team. |
| 12 | + |
| 13 | +3. Bump the crate version in the root `Cargo.toml` to whatever was decided in step 2 (basically a find and replace from old version |
| 14 | + to new version in this file should do the trick). |
| 15 | + |
| 16 | +4. Ensure the `Cargo.lock` file is up to date. |
| 17 | + |
| 18 | + ```bash |
| 19 | + cargo generate-lockfile |
| 20 | + ``` |
| 21 | + |
| 22 | +5. Update `CHANGELOG.md` to reflect the difference between this release and the last. If you're unsure of |
| 23 | + what to add, check with the Networking team. See the `CHANGELOG.md` file for details of the format it follows. |
| 24 | +
|
| 25 | + First, if there have been any significant changes, add a description of those changes to the top of the |
| 26 | + changelog entry for this release. |
| 27 | +
|
| 28 | + Next, mention any merged PRs between releases. |
| 29 | +
|
| 30 | +6. Commit any of the above changes to the release branch and open a PR in GitHub with a base of `master`. |
| 31 | +
|
| 32 | +7. Once the branch has been reviewed and passes CI, merge it. |
| 33 | +
|
| 34 | +8. Now, we're ready to publish the release to crates.io. |
| 35 | + |
| 36 | + 1. Checkout `master`, ensuring we're looking at that latest merge (`git pull`). |
| 37 | +
|
| 38 | + ```bash |
| 39 | + git checkout master && git pull |
| 40 | + ``` |
| 41 | +
|
| 42 | + 2. Perform a final sanity check that everything looks ok. |
| 43 | +
|
| 44 | + ```bash |
| 45 | + cargo test --all-targets |
| 46 | + ``` |
| 47 | +
|
| 48 | + 3. Run the following command to publish the crate on crates.io: |
| 49 | +
|
| 50 | + ```bash |
| 51 | + cargo publish |
| 52 | + ``` |
| 53 | +
|
| 54 | +9. If the release was successful, tag the commit that we released in the `master` branch with the |
| 55 | + version that we just released, for example: |
| 56 | +
|
| 57 | + ```bash |
| 58 | + git tag -s v0.3.0 # use the version number you've just published to crates.io, not this one |
| 59 | + git push --tags |
| 60 | + ``` |
| 61 | + |
| 62 | + Once this is pushed, go along to [the releases page on GitHub](https://github.com/paritytech/litep2p/releases) |
| 63 | + and draft a new release which points to the tag you just pushed to `master` above. Copy the changelog comments |
| 64 | + for the current release into the release description. |
0 commit comments