-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.toml
More file actions
52 lines (45 loc) · 2.02 KB
/
Copy pathrelease.toml
File metadata and controls
52 lines (45 loc) · 2.02 KB
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
# Configuration file for [`cargo-release`](https://github.com/crate-ci/cargo-release)
# See: https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md
#
# Releases are cut locally by a maintainer. There is no release CI workflow;
# the maintainer signs commits and tags with a hardware key (YubiKey) and runs
# `cargo release <level> --execute` from a clean `main`. See RELEASING.md.
# Only release from the default branch.
allow-branch = ["main"]
# All publishable crates share a single workspace version (set via
# `[workspace.package].version`) and bump together.
shared-version = true
# Maintainer signs both the release commit and the tag with their hardware key.
sign-commit = true
sign-tag = true
# Publish to crates.io and push the release commit + tag to the remote.
# cargo-release computes the dependency order automatically and publishes
# leaves before dependents.
publish = true
push = true
# A single release commit and a single tag for the whole workspace, rather than
# one commit/tag per crate.
consolidate-commits = true
pre-release-commit-message = "chore(release): {{version}}"
# Tag once for the whole workspace instead of one tag per crate, named `vX.Y.Z`.
tag-prefix = ""
tag-name = "v{{version}}"
tag-message = "chore(release): {{version}}"
# Regenerate the changelog from conventional commits via git-cliff before the
# release commit is created. The hook runs once per crate; the `WORKSPACE_ROOT`
# env var (set by cargo-release) lets us always target the single workspace
# CHANGELOG, and `DRY_RUN` lets a dry run skip the write. `--tag` makes git-cliff
# treat the in-progress version as released so the new section is materialised.
pre-release-hook = [
"bash",
"-c",
'''
set -euo pipefail
cmd=(git-cliff --config "$WORKSPACE_ROOT/cliff.toml" --repository "$WORKSPACE_ROOT" --tag "{{version}}" --output "$WORKSPACE_ROOT/CHANGELOG.md")
if [ "${DRY_RUN:-false}" = "true" ]; then
echo "dry run: skipping changelog regeneration: ${cmd[*]}" >&2
else
"${cmd[@]}"
fi
''',
]