Skip to content

Commit 09df9c9

Browse files
authored
Add docs for releasing (#16)
* Add docs for releasing
1 parent 1e636c8 commit 09df9c9

File tree

1 file changed

+69
-1
lines changed

1 file changed

+69
-1
lines changed

README.md

+69-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,72 @@ cargo build --release
3535
## Developing
3636

3737
fqtk is developed in Rust and follows the conventions of using `rustfmt` and `clippy` to ensure both code quality and standardized formatting.
38-
When working on fqtk, before pushing any commits, please first run `./ci/check.sh` and resolve any issues that are reported.
38+
When working on fqtk, before pushing any commits, please first run `./ci/check.sh` and resolve any issues that are reported.
39+
40+
## Releasing a New Version
41+
42+
### Pre-requisites
43+
44+
Install [`cargo-release`][cargo-release-link]
45+
46+
```console
47+
cargo install cargo-release
48+
```
49+
50+
### Prior to Any Release
51+
52+
Create a release that will not try to push to `crates.io` and verify the command:
53+
54+
```console
55+
cargo release [major,minor,patch,release,rc...] --no-publish
56+
```
57+
58+
Note: "dry-run" is the default for cargo release.
59+
60+
See the [`cargo-release` reference documentation][cargo-release-docs-link] for more information
61+
62+
### Semantic Versioning
63+
64+
This tool follows [Semantic Versioning](https://semver.org/). In brief:
65+
66+
* MAJOR version when you make incompatible API changes,
67+
* MINOR version when you add functionality in a backwards compatible manner, and
68+
* PATCH version when you make backwards compatible bug fixes.
69+
70+
### Major Release
71+
72+
To create a major release:
73+
74+
```console
75+
cargo release major --execute
76+
```
77+
78+
This will remove any pre-release extension, create a new tag and push it to github, and push the release to creates.io.
79+
80+
Upon success, move the version to the [next candidate release](#release-candidate).
81+
82+
Finally, make sure to [create a new release][new-release-link] on GitHub.
83+
84+
### Minor and Patch Release
85+
86+
To create a _minor_ (_patch_) release, follow the [Major Release](#major-release) instructions substituting `major` with `minor` (`patch`):
87+
88+
```console
89+
cargo release minor --execute
90+
```
91+
92+
### Release Candidate
93+
94+
To move to the next release candidate:
95+
96+
```console
97+
cargo release rc --no-tag --no-publish --execute
98+
```
99+
100+
This will create or bump the pre-release version and push the changes to the main branch on github.
101+
This will not tag and publish the release candidate.
102+
If you would like to tag the release candidate on github, remove `--no-tag` to create a new tag and push it to github.
103+
104+
[cargo-release-link]: https://github.com/crate-ci/cargo-release
105+
[cargo-release-docs-link]: https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md
106+
[new-release-link]: https://github.com/fulcrumgenomics/fqtk/releases/new

0 commit comments

Comments
 (0)