@@ -64,34 +64,24 @@ jobs:
64
64
65
65
echo "✅ All required metadata fields are present"
66
66
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
69
69
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 "
73
73
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
87
75
- name : Test example compilation
88
76
run : |
89
77
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"
95
85
96
86
# Step 8: Generate package information
97
87
- name : Generate package info
103
93
echo "**Description:** $(cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].description')" >> package-info.md
104
94
echo "" >> package-info.md
105
95
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
109
99
echo "" >> package-info.md
110
100
echo "## Binaries" >> package-info.md
111
101
cargo metadata --format-version 1 --no-deps | jq -r '.packages[0].targets[] | select(.kind[] == "bin") | "- " + .name' >> package-info.md
0 commit comments