-
Notifications
You must be signed in to change notification settings - Fork 24
docs: add RELEASING.md release guide #185
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| # Releasing | ||
|
|
||
| How to cut a release of Rodbus. Same steps for release candidates (`1.5.0-RC1`) | ||
| and final releases (`1.5.0`). | ||
|
|
||
| A release is driven by **pushing a git tag**. CI does the publishing (crates.io, | ||
| Maven Central, NuGet, docs, and a draft GitHub release). Your job is to land a | ||
| "Release X.Y.Z" commit on `main`, then tag it. | ||
|
|
||
| ## 1. Prepare the release commit (on a branch) | ||
|
|
||
| ```bash | ||
| OLD=1.5.0-RC2 | ||
| NEW=1.5.0 | ||
|
|
||
| # Bump the version in every crate, FFI binding build file, and the guide. | ||
| grep -rln "$OLD" --include="*.toml" --include="*.txt" --include="*.json" \ | ||
| --include="*.csproj" --include="*.xml" . | grep -v Cargo.lock | \ | ||
| while read f; do sed -i "s/${OLD//./\\.}/$NEW/g" "$f"; done | ||
|
|
||
| # Pull in the latest semver-compatible dependency versions. The FFI binaries | ||
| # ship compiled against whatever is in Cargo.lock, so bake in the latest patches | ||
| # (and keep `cargo audit` meaningful). Review the diff before committing. | ||
| cargo update | ||
| ``` | ||
|
|
||
| - Update the top `CHANGELOG.md` header to `### X.Y.Z ###` and add entries for | ||
| user-facing changes since the last release (skip CI-only changes). | ||
| - Don't forget `guide/sitedata.json` — it holds the version the published guide | ||
| renders. (The grep above catches it; just verify.) | ||
| - Confirm nothing is left behind: `grep -rn "$OLD" . | grep -vE "/target/|\.git/"` | ||
| should print nothing. | ||
|
|
||
| ## 2. Verify, then merge | ||
|
|
||
| ```bash | ||
| cargo check --workspace | ||
| cargo audit # must pass; resolve any advisories before releasing | ||
| ``` | ||
|
|
||
| Open a PR titled `Release X.Y.Z` against `main`, get CI green, and merge. | ||
|
|
||
| ## 3. Tag the release | ||
|
|
||
| The tag name **must exactly match** the version in `Cargo.toml` — CI derives the | ||
| published version from it. Bare semver, no `v` prefix; RCs as `X.Y.Z-RCn`. | ||
|
|
||
| ```bash | ||
| git checkout main && git pull | ||
| git tag -a 1.5.0 -m "Release 1.5.0" | ||
| git push origin 1.5.0 | ||
| ``` | ||
|
|
||
| ## 4. Finish up | ||
|
|
||
| - Watch the tagged CI run. The publish jobs are idempotent, so a re-push of the | ||
| same tag safely retries after a transient failure. | ||
| - CI opens the GitHub release as a **draft** — review the artifacts, paste in the | ||
| changelog section, and publish it. | ||
|
|
||
| > This pipeline mirrors `stepfunc/dnp3`; port release-process fixes between the | ||
| > two repos. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.