Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/release.md: Add release documentation #1712

Merged
merged 7 commits into from
Aug 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Release process

This project follows [semantic versioning](https://semver.org/). The following
documentation will refer to `X.Y.Z` as _major_, _minor_ and _patch_ version.

## Development between releases

- Every substantial pull request should add an entry to the `[unreleased]`
section of the corresponding crate `CHANGELOG.md` file. See
[#1698](https://github.com/libp2p/rust-libp2p/pull/1698/files) as an example.

In case there is no `[unreleased]` section yet, create one with an increased
major, minor or patch version depending on your change. In addition update the
version in the crate's `Cargo.toml` as well as the corresponding entry of the
crate in the root level `Cargo.toml`.


## Releasing one or more crates

1. Remove the `[unreleased]` tag for each crate to be released in the respective
`CHANGELOG.md` and create a pull request against the rust-libp2p `master`
branch.

2. Once merged, create and push a tag for each updated crate.

```bash
cd $CRATE-PATH
tag="$(sed -En 's/^name = \"(.*)\"$/\1/p' Cargo.toml)-$(sed -En 's/^version = \"(.*)\"$/\1/p' Cargo.toml)"
# Use `-s` for a GPG signed tag or `-a` for an annotated tag.
git tag -s "${tag}" -m "${tag}"
git push origin "${tag}"
```

3. Create and push a tag for the top level `libp2p` crate, if it is being
released.

```bash
cd $REPOSITORY-ROOT
# Note the additional `v` here.
tag="v$(sed -En 's/^version = \"(.*)\"$/\1/p' Cargo.toml)"
git tag -s "${tag}" -m "${tag}"
git push origin "${tag}"
```

4. Publish each tagged crate to crates.io. `cargo` assists in getting the order
of the releases correct.

```
cd <CRATE-SUBDIRECTORY>
cargo publish
```