This guide explains how to publish the Solisp crate to crates.io.
-
Crates.io Account
- Create account at https://crates.io
- Generate API token at https://crates.io/me
-
GitHub Secret
- Add
CARGO_REGISTRY_TOKENto repository secrets - Settings → Secrets and variables → Actions → New repository secret
- Add
-
Cargo.toml Verification
- Ensure all metadata is correct (version, description, license, etc.)
- Verify dependencies are properly specified
Edit crates/solisp/Cargo.toml:
[package]
version = "1.0.1" # Increment versionEdit crates/solisp/CHANGELOG.md:
## [1.0.1] - 2025-10-11
### Added
- New feature X
- New feature Y
### Fixed
- Bug fix A
- Bug fix Bgit add crates/solisp/Cargo.toml crates/solisp/CHANGELOG.md
git commit -m "chore(solisp): bump version to 1.0.1"
git push origin maingit tag solisp-v1.0.1
git push origin solisp-v1.0.1This will automatically trigger the GitHub Actions workflow that:
- ✅ Runs all tests
- ✅ Verifies formatting and linting
- ✅ Tests all examples
- ✅ Publishes to crates.io
- ✅ Creates GitHub Release
- ✅ Deploys documentation
Check:
cd crates/solisp
# Check formatting
cargo fmt --all -- --check
# Run clippy
cargo clippy --all-targets --all-features -- -D warnings
# Run all tests
cargo test
# Test examples
cargo run --example run_file examples/hello_world.solisp# Dry run to check what will be published
cargo package --allow-dirty
# Check the generated package
cd target/package
tar -xzf solisp-*.crate
ls -la solisp-*/cd crates/solisp
cargo publish --token YOUR_TOKEN_HEREOr with token from environment:
export CARGO_REGISTRY_TOKEN="your-token-here"
cargo publishTest the publishing workflow without actually publishing:
# Via GitHub Actions UI
# Go to Actions → Publish Solisp Crate → Run workflow
# Set "Dry run" to "true"
# Or manually
cd crates/solisp
cargo publish --dry-run --allow-dirtyFollow Semantic Versioning:
- MAJOR version (1.x.x → 2.0.0): Breaking changes
- MINOR version (1.0.x → 1.1.0): New features, backward compatible
- PATCH version (1.0.0 → 1.0.1): Bug fixes, backward compatible
# Bug fix release
version = "1.0.0" → "1.0.1"
# New feature (backward compatible)
version = "1.0.1" → "1.1.0"
# Breaking changes
version = "1.1.0" → "2.0.0"Before publishing, verify:
- All tests pass:
cargo test - Examples work: Test all
.solispscripts - Documentation builds:
cargo doc --no-deps - Package builds:
cargo package --allow-dirty - Version bumped in
Cargo.toml -
CHANGELOG.mdupdated -
README.mdaccurate - License file present (
LICENSEorLICENSE-MIT) - No sensitive data in repository
After successful publication:
-
Verify on crates.io
https://crates.io/crates/solisp/1.0.1 -
Check documentation
https://docs.rs/solisp/1.0.1 -
Test installation
cargo install solisp --version 1.0.1
-
Announce release
- Update main README.md
- Social media / Discord / Telegram
- Release notes on GitHub
-
Monitor for issues
- Check GitHub issues
- Monitor crates.io download stats
Problem: error: crate version 1.0.0 is already uploaded
Solution: Bump version in Cargo.toml - you cannot re-publish the same version.
version = "1.0.1" # Increment versionProblem: error: missing license file
Solution: Ensure LICENSE or LICENSE-MIT file exists:
cd crates/solisp
# If missing, copy from root
cp ../../LICENSE .Problem: cargo doc fails
Solution: Fix documentation errors:
# Check what's wrong
cargo doc --no-deps
# Common issues:
# - Missing doc comments on public items
# - Broken doc links
# - Code examples that don't compileProblem: error: package size exceeds limit
Solution: Exclude unnecessary files in Cargo.toml:
[package]
exclude = [
"tests/fixtures/*",
"benches/data/*",
"docs/*",
"*.md",
"!README.md",
"!CHANGELOG.md",
]Problem: error: authentication failed
Solution: Check your token:
# Verify token is set
echo $CARGO_REGISTRY_TOKEN
# Or use explicit token
cargo publish --token YOUR_TOKEN_HERE
# Or login interactively
cargo loginIf you need to remove a published version:
# Yank version (prevents new projects from using it)
cargo yank --vers 1.0.1
# Unyank if you change your mind
cargo yank --vers 1.0.1 --undoNote: Yanking doesn't delete; existing users can still use it.
The publish workflow (publish-solisp.yml) triggers on:
- Git tags:
solisp-v*(e.g.,solisp-v1.0.1) - Manual: Via GitHub Actions UI
-
Verify and Test
- Check formatting
- Run clippy
- Build release binary
- Run all tests
- Test all examples
- Generate docs
- Verify package
-
Publish
- Extract version from tag
- Verify version matches
Cargo.toml - Publish to crates.io (or dry-run)
- Create GitHub release
-
Deploy Docs
- Generate documentation
- Deploy to GitHub Pages
-
Notify
- Print success message with links
- Dependencies: Update monthly with
cargo update - Rust toolchain: Test with latest stable
- Security: Run
cargo auditregularly - Documentation: Keep examples and guides current
- Maintain changelog
- Respond to issues promptly
- Tag releases appropriately
- Keep documentation accurate
- Cargo Book: https://doc.rust-lang.org/cargo/
- Publishing Guide: https://doc.rust-lang.org/cargo/reference/publishing.html
- Semantic Versioning: https://semver.org/
- Crates.io Policies: https://crates.io/policies
# Update version
vim crates/solisp/Cargo.toml
# Update changelog
vim crates/solisp/CHANGELOG.md
# Commit and tag
git add crates/solisp/Cargo.toml crates/solisp/CHANGELOG.md
git commit -m "chore(solisp): bump version to X.Y.Z"
git push origin main
git tag solisp-vX.Y.Z
git push origin solisp-vX.Y.Z
# Manual publish (if needed)
cd crates/solisp
cargo publish
# Verify
open https://crates.io/crates/solisp
open https://docs.rs/solispNeed help? Open an issue or contact the maintainers.