Skip to content

Commit 242e71c

Browse files
committed
Add release instructions
1 parent ae00827 commit 242e71c

1 file changed

Lines changed: 47 additions & 2 deletions

File tree

docs/src/contributing.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ cargo install cargo-nextest
3131
cargo install sqlx-cli --no-default-features --features sqlite
3232
```
3333

34-
5. **Set up the database:**
34+
5. **Install cargo-release** (only needed when cutting a release):
35+
36+
```bash
37+
cargo install cargo-release
38+
```
39+
40+
6. **Set up the database:**
3541

3642
```bash
3743
# Create .env file
@@ -41,7 +47,7 @@ echo "DATABASE_URL=sqlite:torc.db" > .env
4147
sqlx migrate run --source torc-server/migrations
4248
```
4349

44-
6. **Build and test:**
50+
7. **Build and test:**
4551

4652
```bash
4753
cargo build
@@ -173,6 +179,45 @@ The runner starts a temporary Torc server, executes each test as a child workflo
173179
writes results to `slurm-tests/output/run_<timestamp>/results.json`. All tests must pass before a
174180
release is tagged.
175181

182+
## Cutting a Release
183+
184+
Releases are driven by [`cargo-release`](https://github.com/crate-ci/cargo-release) with the
185+
configuration in [`release.toml`](https://github.com/NREL/torc/blob/main/release.toml). The tool
186+
bumps the version in every place it needs to be kept in sync (`Cargo.toml`, `Cargo.lock`,
187+
`Dockerfile`, `python_client/pyproject.toml`, and the install snippets in
188+
`docs/src/getting-started/installation.md`) and creates a single "chore: Release" commit.
189+
190+
Prerequisite: `cargo install cargo-release` (see step 5 of [Development Setup](#development-setup)).
191+
192+
From a clean `main` checkout:
193+
194+
```bash
195+
# Dry run -- shows exactly what will change without touching anything.
196+
# (cargo-release defaults to dry-run; --execute is what actually applies the bump.)
197+
cargo release patch
198+
cargo release minor
199+
cargo release major
200+
201+
# Apply the bump. The flags below match how releases are cut today:
202+
# tags and pushes are handled separately so the bump commit can be reviewed first.
203+
cargo release patch --no-publish --no-push --no-tag --execute # 0.30.2 -> 0.30.3
204+
cargo release minor --no-publish --no-push --no-tag --execute # 0.30.2 -> 0.31.0
205+
cargo release major --no-publish --no-push --no-tag --execute # 0.30.2 -> 1.0.0
206+
```
207+
208+
After the bump commit lands on `main`, tag it and push the tag to trigger the
209+
[release workflow](https://github.com/NREL/torc/blob/main/.github/workflows/release.yml), which
210+
builds binaries for all supported platforms and creates a draft GitHub release:
211+
212+
```bash
213+
git push origin main
214+
git tag v0.30.3
215+
git push origin v0.30.3
216+
```
217+
218+
See [`.github/RELEASE.md`](https://github.com/NREL/torc/blob/main/.github/RELEASE.md) for details on
219+
which binaries are produced, supported platforms, and how to publish the draft release.
220+
176221
## Rebuilding the README TUI Demo GIF
177222

178223
The animated TUI screencast in `README.md` is regenerated from a script:

0 commit comments

Comments
 (0)