Skip to content

Commit f3d42d5

Browse files
GiggleLiuclaude
andcommitted
feat: publish CLI crate to crates.io and update install docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 923daed commit f3d42d5

6 files changed

Lines changed: 16 additions & 9 deletions

File tree

.claude/skills/release.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ Both must pass with zero warnings before proceeding.
3636
make release V=x.y.z
3737
```
3838

39-
This target bumps versions in `Cargo.toml` and `problemreductions-macros/Cargo.toml`, runs `cargo check`, commits, tags, and pushes. CI publishes to crates.io.
40-
41-
**Note:** `problemreductions-cli` has its own independent version and is not published to crates.io.
39+
This target bumps versions in `Cargo.toml`, `problemreductions-macros/Cargo.toml`, and `problemreductions-cli/Cargo.toml`, runs `cargo check`, commits, tags, and pushes. CI publishes all three crates to crates.io.

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,9 @@ jobs:
4646

4747
- name: Publish main crate
4848
run: cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
49+
50+
- name: Wait for main crate to be indexed
51+
run: sleep 30
52+
53+
- name: Publish CLI crate
54+
run: cargo publish --manifest-path problemreductions-cli/Cargo.toml --token ${{ secrets.CARGO_REGISTRY_TOKEN }}

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,11 @@ endif
129129
@echo "Releasing v$(V)..."
130130
sed -i '' 's/^version = ".*"/version = "$(V)"/' Cargo.toml
131131
sed -i '' 's/^version = ".*"/version = "$(V)"/' problemreductions-macros/Cargo.toml
132+
sed -i '' 's/^version = ".*"/version = "$(V)"/' problemreductions-cli/Cargo.toml
132133
sed -i '' 's/problemreductions-macros = { version = "[^"]*"/problemreductions-macros = { version = "$(V)"/' Cargo.toml
134+
sed -i '' 's/problemreductions = { version = "[^"]*"/problemreductions = { version = "$(V)"/' problemreductions-cli/Cargo.toml
133135
cargo check
134-
git add Cargo.toml problemreductions-macros/Cargo.toml
136+
git add Cargo.toml problemreductions-macros/Cargo.toml problemreductions-cli/Cargo.toml
135137
git commit -m "release: v$(V)"
136138
git tag -a "v$(V)" -m "Release v$(V)"
137139
git push origin main --tags

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ problemreductions = "0.2"
2929
Install the `pred` command-line tool for exploring the reduction graph from your terminal:
3030

3131
```bash
32-
cargo install --git https://github.com/CodingThrust/problem-reductions problemreductions-cli
32+
cargo install problemreductions-cli
3333
```
3434

3535
Or build from source:

docs/src/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ The `pred` command-line tool lets you explore the reduction graph, create proble
44

55
## Installation
66

7-
Install from the repository:
7+
Install from crates.io:
88

99
```bash
10-
cargo install --git https://github.com/CodingThrust/problem-reductions problemreductions-cli
10+
cargo install problemreductions-cli
1111
```
1212

1313
Or build from source:

problemreductions-cli/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[package]
22
name = "problemreductions-cli"
3-
version = "0.1.0"
3+
version = "0.3.0"
44
edition = "2021"
55
description = "CLI tool for exploring NP-hard problem reductions"
66
license = "MIT"
7+
repository = "https://github.com/CodingThrust/problem-reductions"
78

89
[[bin]]
910
name = "pred"
@@ -19,7 +20,7 @@ lpsolve = ["problemreductions/ilp-lpsolve"]
1920
microlp = ["problemreductions/ilp-microlp"]
2021

2122
[dependencies]
22-
problemreductions = { path = "..", default-features = false }
23+
problemreductions = { version = "0.3.0", path = "..", default-features = false }
2324
clap = { version = "4", features = ["derive"] }
2425
anyhow = "1"
2526
serde = { version = "1", features = ["derive"] }

0 commit comments

Comments
 (0)