@@ -12,7 +12,7 @@ Cargo-release is already installed. The configuration is in `release.toml`.
1212Preview what will happen without making changes:
1313
1414``` bash
15- cargo release --dry-run
15+ cargo release patch
1616```
1717
1818This shows:
@@ -25,15 +25,15 @@ This shows:
2525Execute the full release workflow:
2626
2727``` bash
28- cargo release
28+ cargo release patch --execute
2929```
3030
3131This automatically:
32321 . ✅ Bumps version in ` Cargo.toml `
33332 . ✅ Runs tests: ` cargo test `
34343 . ✅ Runs formatting check: ` cargo fmt --check `
35- 4 . ✅ Updates ` CHANGELOG.md ` (if configured)
36- 5 . ✅ Runs: ` cargo publish -p sofos ` (custom publish command)
35+ 4 . ✅ Updates ` CHANGELOG.md `
36+ 5 . ✅ Publishes to crates.io
37376 . ✅ Creates release commit: ` "Release v0.1.18" `
38387 . ✅ Creates Git tag: ` v0.1.18 `
39398 . ✅ Pushes commits and tags to remote
@@ -43,29 +43,29 @@ Bump to a specific version (major, minor, patch):
4343
4444``` bash
4545# Patch release (0.1.17 → 0.1.18)
46- cargo release patch
46+ cargo release patch --execute
4747
4848# Minor release (0.1.17 → 0.2.0)
49- cargo release minor
49+ cargo release minor --execute
5050
5151# Major release (0.1.17 → 1.0.0)
52- cargo release major
52+ cargo release major --execute
5353```
5454
55+ ** Note:** Always specify a version level (patch/minor/major). Running ` cargo release ` without a level will try to re-release the current version.
56+
5557### 4. Release Without Publishing to crates.io
56- To skip the custom publish command (useful for testing) :
58+ If you want to skip publishing :
5759
5860``` bash
59- cargo release --allow-dirty --no-verify
61+ cargo release patch --execute --no-publish
6062```
6163
62- Or if you want to run the release but skip the publish hook entirely, you can temporarily comment out the ` pre-release-hook ` line in ` release.toml ` .
63-
6464### 5. Release Without Pushing to Git
6565For testing/staging:
6666
6767``` bash
68- cargo release --no-push
68+ cargo release patch --execute --no-push
6969```
7070
7171## What Gets Updated
@@ -95,8 +95,6 @@ Ensure:
9595
9696## crates.io Publishing Setup
9797
98- The project uses a custom publish command ` cargo publish -p sofos ` via a pre-release hook.
99-
10098If this is your first time publishing to crates.io:
10199
102100``` bash
@@ -106,16 +104,14 @@ cargo login
106104# This creates/updates ~/.cargo/credentials.toml
107105```
108106
109- The custom publish command is configured in ` release.toml ` as a ` pre-release-hook ` , which runs before creating the git commit and tag.
110-
111107## Configuration
112108
113109The release process is configured in ` release.toml ` :
114110
115- - ** pre-release-hook** : Runs custom publish command: ` cargo publish -p sofos `
116111- ** changelog** : Automatically update CHANGELOG.md
117112- ** git.push** : Push commits and tags to remote
118113- ** git.tag-name** : Tag format (v{{version}})
114+ - ** publish** : Publish to crates.io
119115
120116## Example Release Workflow
121117
@@ -130,12 +126,12 @@ $ cargo release --dry-run
130126Prepared release of sofos v0.1.18
131127
132128# Step 3: Execute release
133- $ cargo release
129+ $ cargo release patch --execute
134130Releasing sofos v0.1.18
135131- Bump version in Cargo.toml
136132- Run pre-release checks
137133- Update CHANGELOG.md
138- - Run: cargo publish -p sofos
134+ - Publish to crates.io
139135- Create release commit
140136- Create git tag v0.1.18
141137- Push to remote
0 commit comments