|
| 1 | +# Contributing to frequenz-microgrid-rs |
| 2 | + |
| 3 | +## Releasing |
| 4 | + |
| 5 | +These are the steps to create a new release: |
| 6 | + |
| 7 | +1. Get the latest head you want to create a release from. |
| 8 | + |
| 9 | +2. Update the version in `Cargo.toml` to the new version. Without this, |
| 10 | + the new release will be rejected by `crates.io`. |
| 11 | + |
| 12 | + Along with this, update the `RELEASE_NOTES.md` file if it is not |
| 13 | + complete, up to date, and remove template comments (`<!-- ... ->`) |
| 14 | + and empty sections. |
| 15 | + |
| 16 | + Submit a pull request if an update is needed, wait until it is |
| 17 | + merged, and update the latest head you want to create a release |
| 18 | + from to get the new merged pull request. |
| 19 | + |
| 20 | +3. Create a new signed tag using the release notes and |
| 21 | + a [semver](https://semver.org/) compatible version number with a `v` prefix, |
| 22 | + for example: |
| 23 | + |
| 24 | + ```sh |
| 25 | + git tag -s --cleanup=whitespace -F RELEASE_NOTES.md v0.0.1 |
| 26 | + ``` |
| 27 | + |
| 28 | +4. Push the new tag. |
| 29 | + |
| 30 | +5. A GitHub action will test the tag and if all goes well it will create |
| 31 | + a [GitHub |
| 32 | + Release](https://github.com/frequenz-floss/frequenz-microgrid-rs/releases), |
| 33 | + and upload a new package to |
| 34 | + [crates.io](https://crates.io/crates/frequenz-microgrid-rs) |
| 35 | + automatically. |
| 36 | + |
| 37 | +6. Once this is done, reset the `RELEASE_NOTES.md` with the template: |
| 38 | + |
| 39 | + ```sh |
| 40 | + cp .github/RELEASE_NOTES.template.md RELEASE_NOTES.md |
| 41 | + ``` |
| 42 | + |
| 43 | + Commit the new release notes and create a PR (this step should be automated |
| 44 | + eventually too). |
| 45 | + |
| 46 | +7. Celebrate! |
0 commit comments