-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: update RELEASE.md with latest process (#312)
- Loading branch information
Showing
2 changed files
with
11 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,17 @@ | ||
# Release | ||
# Release Process | ||
|
||
The release process for the `wdl` family of crates is intentionally disjoint | ||
across the repository. When releasing any new packages: | ||
## Between Releases | ||
|
||
* You should first release each of the component crates (all crates that are not | ||
`wdl`) in a sequential fashion using the [component crates](#component-crates) | ||
section. | ||
* Next (if desired), you should release the convenience crate (the `wdl` crate) | ||
by following the [convenience crate](#convenience-crate) section. | ||
Various CI features have been implemented to ease the release process, but some parts of it are still intended to be manual. e.g. each CHANGELOG for each individual crate should be written by hand _prior to release_. We subscribe to the philosphy outlined on the [keepachangelog site](https://keepachangelog.com/en/1.1.0/). The short version is that (almost) every PR should include a manually written entry to one or more CHANGELOGs in the repository under the `## Unreleased` header. | ||
|
||
Notably, updates to the files listed below should be grouped in a single commit | ||
**per crate**, but updates to these files across crates should not be contained | ||
within a single commit. | ||
## Time to Release! | ||
|
||
## Component Crates | ||
The first step in making a release is to run the [`bump` GitHub action](https://github.com/stjude-rust-labs/wdl/actions/workflows/bump.yml). This action will do two things: | ||
|
||
**Note:** in this example, we will be using the `wdl-grammar` crate. Please | ||
substitute the name of the crate that you are working on. | ||
1. Go through each publishable `wdl-*` crate and increment the version in `Cargo.toml` (as well as match any internal dependency versions that need to be bumped). | ||
2. Update each CHANGELOG.md file with a new release header. | ||
* This piece of the `ci` code relies on the line `## Unreleased` being present in the CHANGELOG.md file (see the [`ci` crate code](https://github.com/stjude-rust-labs/wdl/blob/main/ci/src/main.rs) for details). | ||
|
||
**Note:** crates should be released sequentially based on the dependency tree. | ||
For example, `wdl-grammar` should be released before `wdl-ast`, as | ||
`wdl-ast` depends on `wdl-grammar`. | ||
Then the `bump` action will open a PR with the above changes for manual review. Please ensure everything looks good and the CI is passing before merging the PR! | ||
|
||
For every component crate that has changes: | ||
|
||
* [ ] Update version in `Cargo.toml`. | ||
* [ ] Update versions of any `wdl-*` crate dependencies in `Cargo.toml`. | ||
* If any of the crates do _not_ have updated versions, be sure they also | ||
don't have changes to release. If they do, you may be releasing the crates | ||
out of order! | ||
* [ ] Update `CHANGELOG.md` with version and publication date. | ||
* To get the changes to the crate since the last release, you can use a | ||
command like the following: | ||
```bash | ||
git log wdl-grammar-v0.1.0..HEAD --oneline -- wdl-grammar | ||
``` | ||
* [ ] Run tests: `cargo test --all-features`. | ||
* [ ] Run tests for examples: `cargo test --examples --all-features`. | ||
* [ ] Run linting: `cargo clippy --all-features`. | ||
* [ ] Run fmt: `cargo fmt --check`. | ||
* [ ] Run doc: `cargo doc`. | ||
* [ ] Stage changes: `git add Cargo.toml CHANGELOG.md`. | ||
* [ ] Create git commit: | ||
``` | ||
git commit -m "release: bumps `wdl-grammar` version to v0.1.0" | ||
``` | ||
* [ ] Create git tag: | ||
``` | ||
git tag wdl-grammar-v0.1.0 | ||
``` | ||
* [ ] Push release: `git push && git push --tags`. | ||
* [ ] Publish the component crate: `cargo publish --all-features`. | ||
* [ ] Go to the Releases page in Github, create a Release for this tag, and | ||
copy the notes from the `CHANGELOG.md` file. | ||
|
||
## Convenience Crate | ||
|
||
From the root directory: | ||
|
||
* [ ] Update the version of the top-level crate in the root `Cargo.toml`. | ||
* **Note:** changes to the version number will be automatically reflected in | ||
`wdl/Cargo.toml`, as the version there is specified as `version.workspace = | ||
true`. | ||
* [ ] Run tests: `cargo test --all-features`. | ||
* [ ] Run tests for examples: `cargo test --examples --all-features`. | ||
* [ ] Run linting: `cargo clippy --all-features`. | ||
* [ ] Run fmt: `cargo fmt --check`. | ||
* [ ] Run doc: `cargo doc`. | ||
* [ ] Stage changes: `git add Cargo.toml`. | ||
* [ ] Create git commit: | ||
``` | ||
git commit | ||
``` | ||
|
||
The commit message should have a body conforming to this style: | ||
|
||
``` | ||
release: bumps `wdl` version to v0.1.0 | ||
|
||
Component Crate Updates | ||
----------------------- | ||
|
||
* `wdl-grammar`: introduced at v0.1.0 ([release](https://github.com/stjude-rust-labs/wdl/releases/tag/wdl-grammar-v0.1.0)) | ||
* `wdl-fictitous`: bumped from v0.1.0 to v0.2.0 ([release](https://github.com/stjude-rust-labs/wdl/releases/tag/wdl-fictitous-v0.2.0)) | ||
``` | ||
* [ ] Create git tag: `git tag wdl-v0.1.0`. | ||
* [ ] Push release: `git push && git push --tags`. | ||
* [ ] Publish the new crate: `cargo publish --all-features -p wdl`. | ||
* [ ] Go to the Releases page in Github, create a Release for this tag, and | ||
copy the body from the commit message that describes the package version | ||
updates. | ||
* Ensure that you change the heading style from | ||
``` | ||
Component Crate Updates | ||
----------------------- | ||
``` | ||
to | ||
``` | ||
## Component Crate Updates | ||
``` | ||
Once the bump PR merges, tag the HEAD commit with `wdl-v{VERSION}` (where `VERSION` matches the latest version in `wdl/Cargo.toml`) and the CI should handle the rest! |