Skip to content

Commit

Permalink
fix: adding release process description
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanti committed Sep 12, 2024
1 parent 943cf13 commit 0af8679
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,52 @@ Run `git submodule update --init --recursive -f`

Run `cargo build --release` to build CLI tool and all required dependencies.

## Releasing

CLI tool and FastEdge lib are released with GitHub using [cargo-release](https://github.com/crate-ci/cargo-release) tool.
The release process includes next steps:
* increment crate version in Cargo.toml
* generate CHANGELOG.md file
* push version tag
* create GitHub release and build artefacts

### Prerequisites

Install cargo release:
```
cargo install cargo-release
```
Install [git-cliff](https://git-cliff.org) (tool to generate changelog from Git history):
```
cargo install git-cliff
```
### Creating new release

We are using GitFlow strategy. That means that everything in `main` branch should be ready to be released.
To create a new release it is necessary to checkout a new release branch with next naming convention: `releases/vX.Y.Z`.
Where the `vX.Y.Z` is the next version number.

```
cargo release <LEVEL> --execute
```
This command will commit and push to remote changed Cargo.toml and CHANGELOG.md files. And also add a tag for current release.
Once the release branch is pushed on remote it triggers the release process as GitHub Action.

Note: It also creates a PR for `releases/**` branch to merge it to `main` as soon as release is ready.

#### Release bump level

* `release`: Remove the pre-release extension; if any (0.1.0-alpha.1 -> 0.1.0, 0.1.0 -> 0.1.0).
* `patch`:
* If version has a pre-release, then the pre-release extension is removed (0.1.0-alpha.1 -> 0.1.0).
* Otherwise, bump the patch field (0.1.0 -> 0.1.1)
* `minor`: Bump minor version (0.1.0-pre -> 0.2.0)
* `major`: Bump major version (0.1.0-pre -> 1.0.0)
* `alpha`, `beta`, and `rc`: Add/increment pre-release to your version
(1.0.0 -> 1.0.1-rc.1, 1.0.1-alpha -> 1.0.1-rc.1, 1.0.1-rc.1 ->
1.0.1-rc.2)


# Running

## CLI
Expand Down
2 changes: 1 addition & 1 deletion release.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pre-release-hook = ["git", "cliff", "-o", "CHANGELOG.md", "--tag", "{{version}}" ]
#allow-branch = ["main"]
allow-branch = ["releases/**"]
publish = false

0 comments on commit 0af8679

Please sign in to comment.