Skip to content

Commit 00f018e

Browse files
committed
feat: simplify publishing workflows and documentation
1 parent a0f6737 commit 00f018e

File tree

2 files changed

+21
-31
lines changed

2 files changed

+21
-31
lines changed

.github/workflows/publish-test.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,34 +64,24 @@ jobs:
6464
6565
echo "✅ All required metadata fields are present"
6666
67-
# Step 5: Test packaging with examples-only feature (no git deps)
68-
- name: Test package with examples-only feature
67+
# Step 5: Test packaging (all examples without git dependencies)
68+
- name: Test package
6969
run: |
70-
echo "Testing package with examples-only feature (no git dependencies)..."
71-
cargo package --features examples-only --no-default-features --verbose
72-
echo "✅ Package builds successfully with examples-only feature"
70+
echo "Testing package for crates.io publishing..."
71+
cargo package --verbose
72+
echo "✅ Package builds successfully and is ready for crates.io"
7373
74-
# Step 6: Test packaging with default features (including MCP)
75-
- name: Test package with default features
76-
run: |
77-
echo "Testing package with default features..."
78-
# This may fail due to git dependency, which is expected
79-
if cargo package --verbose; then
80-
echo "✅ Package builds successfully with default features"
81-
else
82-
echo "⚠️ Package fails with default features (expected due to git dependency)"
83-
echo " This is normal - the examples-only feature should be used for crates.io"
84-
fi
85-
86-
# Step 7: Verify example binaries can build
74+
# Step 6: Verify example binaries can build
8775
- name: Test example compilation
8876
run: |
8977
echo "Testing example binary compilation..."
90-
# Test a few key examples
91-
cargo build --features examples-only --no-default-features --bin example_01_hello_world
92-
cargo build --features examples-only --no-default-features --bin example_02_calculator
93-
cargo build --features examples-only --no-default-features --bin example_09_database
94-
echo "✅ Key examples compile successfully"
78+
# Test a few key examples to ensure they build correctly
79+
cargo build --bin example_01_hello_world
80+
cargo build --bin example_02_calculator
81+
cargo build --bin example_09_database
82+
cargo build --bin example_13_auth_service
83+
cargo build --bin example_20_enterprise_server
84+
echo "✅ All key examples compile successfully"
9585
9686
# Step 8: Generate package information
9787
- name: Generate package info
@@ -103,9 +93,9 @@ jobs:
10393
echo "**Description:** $(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].description')" >> package-info.md
10494
echo "" >> package-info.md
10595
echo "## Features" >> package-info.md
106-
echo "- \`default\`: Includes MCP SDK (git dependency)" >> package-info.md
107-
echo "- \`mcp\`: MCP SDK support" >> package-info.md
108-
echo "- \`examples-only\`: Just the educational code" >> package-info.md
96+
echo "- Educational Rust examples for MCP development" >> package-info.md
97+
echo "- 20 comprehensive examples from basic to enterprise level" >> package-info.md
98+
echo "- No external git dependencies for easy installation" >> package-info.md
10999
echo "" >> package-info.md
110100
echo "## Binaries" >> package-info.md
111101
cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].targets[] | select(.kind[] == "bin") | "- " + .name' >> package-info.md

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,16 +235,16 @@ jobs:
235235
- name: Verify package
236236
run: |
237237
echo "Verifying package for crates.io publishing..."
238-
echo "Note: Using examples-only feature to avoid git dependencies"
239-
cargo package --features examples-only --no-default-features --verbose
240-
cargo package --features examples-only --no-default-features --list
238+
echo "Package contains educational examples without git dependencies"
239+
cargo package --verbose
240+
cargo package --list
241241
242242
# Step 5: Publish to crates.io
243243
- name: Publish to crates.io
244244
run: |
245245
echo "Publishing MCP Rust Examples to crates.io..."
246-
echo "Using examples-only feature for crates.io compatibility"
247-
cargo publish --features examples-only --no-default-features --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
246+
echo "📦 Publishing educational Rust examples for the MCP community"
247+
cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} --verbose
248248
env:
249249
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
250250

0 commit comments

Comments
 (0)