Skip to content

Commit 6a25ed1

Browse files
authored
Merge pull request #23 from braun-embedded/release-procedure
Document release procedure
2 parents 125e83d + 576f3d8 commit 6a25ed1

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

CONTRIBUTING.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,57 @@ This repository contains multiple crates: The main `step-dir` crate, as well as
1616
This means if a new version of `step-dir` is released, all driver crates are released around the same time, sharing the same version number. Updating the versions will be done in the same commit, and that commit will be tagged with the version number for that release.
1717

1818
If a new release of some, but not all, crates is required, the version of all other crates is still updated, and a release is published. This is not ideal, but it prevents a situation where a crate must skip a version number, which could be confusing. Such a situation can occur because each release is tagged in the repository, and we can't create multiple tags for the same version number (and if we could, we really shouldn't).
19+
20+
### Publishing a release
21+
22+
This procedure should really be automated, but for now it is at least documented.
23+
24+
1. Make sure your local `master` branch is up-to-date:
25+
26+
```
27+
git switch master
28+
git pull --rebase
29+
```
30+
31+
2. Choose new version number, according to [Semantic Versioning]. The following steps will use `a.b.c` as a placeholder for the chosen version.
32+
33+
3. Create a release branch (replace `a.b.c` with actual version)
34+
35+
```
36+
git switch -c publish-a.b.c
37+
```
38+
39+
4. Update changelog: Go through all pull requests since the last release and mention the relevant ones. Use changelog entries as the template. Commit this to the repository.
40+
41+
5. Update versions in all `Cargo.toml` files, including dependencies on `step-dir` in drivers. Commit this to the repository.
42+
43+
6. Push branch, open a pull request. This makes sure the CI runs and gives other maintainers a chance to weigh in.
44+
45+
7. Once ready, publish `step-dir`: Run `cargo publish` from the repository root.
46+
47+
8. Publish all driver crates. Go into each directory in `drivers/`, run `cargo publish` there.
48+
49+
9. Tag the release
50+
51+
```
52+
git tag va.b.c
53+
```
54+
55+
10. Merge pull request, clean up your local branch.
56+
57+
```
58+
# merge pull request
59+
git switch master
60+
git pull --rebase
61+
git remote prune origin
62+
git branch -d publish-a.b.c
63+
```
64+
65+
11. Push the release tag
66+
67+
```
68+
git push --tag
69+
```
70+
71+
72+
[Semantic Versioning]: https://semver.org/

0 commit comments

Comments
 (0)