1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Configuration for cargo-release: https://github.com/crate-ci/cargo-release
#
# Quick start:
#
# cargo install cargo-release # one-time
# cargo release patch # dry-run: show what would happen
# cargo release patch --execute # actually do it
# cargo release 0.2.0 --execute # explicit version
#
# What `cargo release patch --execute` does:
#
# 1. Verifies the working tree is clean and the current branch is `main`.
# 2. Bumps the package version in Cargo.toml (patch / minor / major / explicit).
# 3. Refreshes Cargo.lock.
# 4. Rewrites CHANGELOG.md — moves the contents of `## [Unreleased]` under a
# new `## [X.Y.Z] — YYYY-MM-DD` heading and re-inserts a fresh empty
# `## [Unreleased]` above it.
# 5. Runs `cargo test --all-features` (pre-release-hook) and
# `cargo publish --dry-run --all-features` (verify).
# 6. Commits Cargo.toml + Cargo.lock + CHANGELOG.md with the message
# `chore(release): X.Y.Z`.
# 7. Tags `vX.Y.Z` (matches the `^v\d+\.\d+\.\d+$` rule in `.gitlab-ci.yml`).
# 8. Pushes commit and tag to `origin`.
#
# What it does NOT do:
#
# - It does not run `cargo publish`. GitLab CI runs the publish step on tag
# push, using the masked `CARGO_REGISTRY_TOKEN` CI/CD variable. This keeps
# the publish credential off developer laptops.
# Don't publish from local — CI does it on tag push.
= false
# This crate lives in a `[workspace]` (alongside `xtask`), so cargo-release
# takes the `workspace_commit` code path. That path only populates the
# `{{version}}` template variable when at least one selected package has
# `shared-version` set — otherwise the commit message lands with the literal
# string `{{version}}`. Joining a single-member version group keeps the
# substitution working.
= "reasoninglayer"
# Push the release commit and tag to origin once everything passes.
= true
= "origin"
# Releases must originate from the main branch.
= ["main"]
# We don't currently sign release artefacts. Flip these on if/when the team
# adopts signed commits + GPG-signed tags.
= false
= false
# Run the test suite as a pre-release sanity check. CI re-runs everything on
# push, but failing locally before we tag is faster than failing in CI after.
= ["cargo", "test", "--all-features"]
# Run `cargo publish --dry-run` before tagging — same check the CI performs.
= true
# Rewrite CHANGELOG.md: rename `## [Unreleased]` to `## [Unreleased]\n\n## [X.Y.Z] — YYYY-MM-DD`,
# so whatever was under [Unreleased] becomes the release notes for this version
# and a fresh empty [Unreleased] section is left for the next iteration.
# `min = 1` makes this fail loudly if the [Unreleased] header is missing.
= [
{ = "CHANGELOG.md", = "## \\[Unreleased\\]", = "## [Unreleased]\n\n## [{{version}}] — {{date}}", = 1 },
]
# Tag name must match the GitLab CI publish trigger:
# `rules: - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/`
= ""
= "v{{version}}"
# Commit and tag messages.
#
# cargo-release's templating is a literal string-replace of `{{version}}`,
# `{{crate_name}}`, etc. — no whitespace allowed inside the braces.
= "chore(release): {{version}}"
= "Release v{{version}}"