Skip to content

Commit 625e8e6

Browse files
committed
chore(release): run meta tag in bump-only mode (#17)
Dogfood the new mode: this repo's meta tag now bumps + pushes the branch and lets release.yml own the tag. Update docs/releasing.md to match.
1 parent 104e9bb commit 625e8e6

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

.meta/meta.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ allowlist = [
3939
"tempfile", "assert_cmd", "predicates",
4040
]
4141

42+
[tag]
43+
# CI owns tagging + publish (see .github/workflows/release.yml). `meta tag`
44+
# bumps + commits + pushes the branch, but must NOT create the tag or the
45+
# release workflow no-ops. See docs/releasing.md and issue #17.
46+
mode = "bump-only"
47+
4248
[[version.locations]]
4349
path = "Cargo.toml"
4450
anchor = '^version\s*='

docs/releasing.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ Cutting a release publishes two artifacts from a single `v*` tag:
99

1010
## The version is the single source of truth
1111

12-
`Cargo.toml`'s `[package] version` drives everything. **You never create a tag
13-
by hand** — hand-cutting a `vX.Y.Z` tag without bumping the file is exactly how a
14-
release fails at the "verify tag matches crate version" step.
12+
`Cargo.toml`'s `[package] version` drives everything. **You never create the tag
13+
locally** — neither by hand nor via `meta tag` (which runs in bump-only mode
14+
here). `release.yml` derives and pushes the tag from the merged version. Cutting
15+
a `vX.Y.Z` tag yourself is exactly how a release fails at the "verify tag matches
16+
crate version" step, or no-ops because the tag already exists.
1517

1618
## Steps
1719

18-
1. Open a PR that bumps `version` in `Cargo.toml` (and the matching `Cargo.lock`
19-
entry — `cargo build` updates it; the `lockfile` check enforces it). Locally,
20-
`cargo run -- tag <level> --dry-run` shows the bump without touching anything.
20+
1. On a branch, run `cargo run -- tag <level>` (this repo runs `meta tag` in
21+
**bump-only** mode — see `.meta/meta.toml`). It rewrites `Cargo.toml` + the
22+
`Cargo.lock` entry, commits `chore: release vX.Y.Z`, and pushes the branch —
23+
but does **not** create the tag, because `release.yml` owns tagging. Open a PR
24+
from that branch. `cargo run -- tag <level> --dry-run` previews without
25+
touching anything.
2126
2. Merge to `main`. The `release` workflow fires on the merge push and runs three
2227
jobs **in one run**:
2328
- `prepare` reads the new version and pushes the matching `vX.Y.Z` tag (skips

0 commit comments

Comments
 (0)