-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.toml
More file actions
64 lines (57 loc) · 2.69 KB
/
Copy pathrelease.toml
File metadata and controls
64 lines (57 loc) · 2.69 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
53
54
55
56
57
58
59
60
61
62
63
64
# 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. `cargo release <level> --execute`
# from a clean `main` bumps the workspace version, regenerates the changelog,
# and creates the signed `vX.Y.Z` tag. Pushing that tag triggers the binary
# release pipeline (`.github/workflows/release.yml`, generated by cargo-dist)
# and the multi-arch Docker build (`.github/workflows/docker.yml`).
# See RELEASING.md.
# Only release from the default branch.
allow-branch = ["main"]
# All 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
# Vertex crates are not published to crates.io; the release artefacts are the
# binaries and the Docker image. Push the release commit and tag so the tag push
# triggers the release workflows.
publish = false
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, named `vX.Y.Z`.
tag-prefix = ""
tag-name = "v{{version}}"
tag-message = "chore(release): {{version}}"
# Prepend the changes since the previous tag to the changelog before the release
# commit is created. `--unreleased` bounds the new section to commits after the
# last tag and `--prepend` inserts it above the curated history, so the file
# never re-dumps the full project log. 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. The very first release has no previous tag (so
# `--unreleased` would be unbounded): in that case the curated initial summary
# already IS the release notes, so the hook leaves the changelog untouched.
pre-release-hook = [
"bash",
"-c",
'''
set -euo pipefail
if [ "${DRY_RUN:-false}" = "true" ]; then
echo "dry run: skipping changelog update" >&2
exit 0
fi
if git -C "$WORKSPACE_ROOT" describe --tags --abbrev=0 >/dev/null 2>&1; then
git-cliff --config "$WORKSPACE_ROOT/cliff.toml" --repository "$WORKSPACE_ROOT" \
--unreleased --tag "{{version}}" --prepend "$WORKSPACE_ROOT/CHANGELOG.md"
else
echo "no previous tag: keeping the curated initial changelog" >&2
fi
''',
]