This guide explains how to publish a new release of RustWall to crates.io using the automated GitHub Actions workflow.
Before you can publish releases, ensure you have:
- Crates.io Account: Linked to your GitHub account
- API Token: Set up in GitHub repository secrets
- Repository Access: Push access to the main repository
- Go to crates.io
- Log in with your GitHub account
- Navigate to Account Settings β API Tokens
- Click "New Token"
- Set permissions to "Publish"
- Copy the generated token (you won't see it again!)
- Go to your GitHub repository
- Navigate to Settings β Secrets and variables β Actions
- Click "New repository secret"
- Name:
CARGO_REGISTRY_TOKEN - Value: Paste your crates.io API token
- Click "Add secret"
-
Update the version in
Cargo.toml:[package] name = "rustwall" version = "0.2.0" # β Update this version number
-
Update version references in documentation if needed
-
Test locally to ensure everything works:
cargo test --workspace --all-features cargo build --workspace --all-features cargo publish --dry-run -
Commit and push the version change:
git add Cargo.toml git commit -m "chore: bump version to v0.2.0" git push origin main
- Go to your repository on GitHub
- Click "Releases" (in the right sidebar)
- Click "Create a new release"
- Fill in the release details:
- Tag version:
v0.2.0(must match Cargo.toml version with 'v' prefix) - Release title:
v0.2.0orRustWall v0.2.0 - Description: Add release notes (see template below)
- Tag version:
- Click "Publish release"
Once you publish the release, GitHub Actions will automatically:
β
Run Tests: Full test suite across multiple platforms
β
Quality Checks: Code formatting and clippy lints
β
Build Binaries: Cross-platform release binaries
β
Publish to Crates.io: Automatic package publishing
β
Attach Artifacts: Binaries attached to GitHub release
Use this template for your release description:
## π What's New in v0.2.0
### β¨ New Features
- Added new anonymity protection features
- Enhanced DDoS mitigation capabilities
- Improved Tor network integration
### π οΈ Improvements
- Better error handling in CAPTCHA system
- Performance optimizations
- Updated dependencies
### π Bug Fixes
- Fixed issue with session timeout handling
- Resolved memory leak in traffic analysis
### π Documentation
- Updated API documentation
- Added new usage examples
- Improved installation guide
### π§ Technical Changes
- Refactored module structure
- Added comprehensive test coverage
- Enhanced CI/CD pipeline
## π¦ Installation
```bash
cargo add rustwall
## π Monitoring the Release
### Check Release Progress
1. **GitHub Actions**: Go to **Actions** tab to monitor workflow progress
2. **Crates.io**: Check [crates.io/crates/rustwall](https://crates.io/crates/rustwall) for publication
3. **Release Assets**: Verify binaries are attached to the GitHub release
### If Something Goes Wrong
1. **Check workflow logs** in the Actions tab
2. **Common issues**:
- Version already exists on crates.io
- API token expired or invalid
- Test failures
- Build errors on specific platforms
## π Version Numbering
Follow [Semantic Versioning](https://semver.org/):
- **MAJOR** (1.0.0): Breaking changes
- **MINOR** (0.1.0): New features, backward compatible
- **PATCH** (0.0.1): Bug fixes, backward compatible
### Examples:
- `0.1.0` β `0.1.1`: Bug fix
- `0.1.1` β `0.2.0`: New features
- `0.9.0` β `1.0.0`: First stable release
## π― Release Checklist
Before creating a release:
- [ ] Version updated in `Cargo.toml`
- [ ] All tests pass locally
- [ ] Documentation is up to date
- [ ] CHANGELOG.md updated (if you have one)
- [ ] No uncommitted changes
- [ ] Main branch is up to date
After creating a release:
- [ ] GitHub Actions workflow completed successfully
- [ ] Package appears on crates.io
- [ ] Release binaries are attached
- [ ] Documentation updated on docs.rs
## π Troubleshooting
### Common Issues
**"Version already exists"**
- You've already published this version
- Increment the version number in Cargo.toml
**"Invalid token"**
- Check that CARGO_REGISTRY_TOKEN is set correctly
- Token may have expired - generate a new one
**"Tests failed"**
- Fix failing tests before releasing
- Check the Actions tab for detailed error logs
**"Build failed"**
- Check for platform-specific build issues
- Review compiler errors in workflow logs
### Getting Help
- Check [GitHub Issues](https://github.com/austinsonger/rustwall/issues)
- Review [Cargo documentation](https://doc.rust-lang.org/cargo/)
- Ask in [Rust community forums](https://users.rust-lang.org/)
---
π **Happy releasing!** Your automated workflow makes publishing new versions of RustWall simple and reliable.