Last Updated: 2025-10-03 Version: 0.1.0
pforge follows Semantic Versioning 2.0.0 and uses automated release workflows for consistency and reliability.
Each release produces:
- Binaries: Linux (x86_64, musl), macOS (x86_64, ARM64), Windows (x86_64)
- Checksums: SHA256 for all binaries
- Crates: Published to crates.io
- Documentation: Versioned API docs on docs.rs
- Changelog: Auto-generated from commits
| Release Type | Frequency | Example | Breaking Changes |
|---|---|---|---|
| Major | As needed | 1.0.0 → 2.0.0 | ✅ Yes |
| Minor | Monthly | 1.0.0 → 1.1.0 | ❌ No |
| Patch | As needed | 1.0.0 → 1.0.1 | ❌ No |
During 0.x.x phase:
- Minor releases (0.1.0 → 0.2.0) may include breaking changes
- Patch releases (0.1.0 → 0.1.1) are backwards compatible
- Aim for 1.0.0 when API is stable
Step 1: Run the release script
./scripts/release.sh <version>Example:
./scripts/release.sh 0.2.0The script will:
- Validate version format
- Check working directory is clean
- Update all Cargo.toml files
- Update Cargo.lock
- Run full test suite
- Run quality gates (clippy, fmt)
- Create release commit
- Create git tag
Step 2: Review and push
# Review the commit
git show HEAD
# Push commit and tag
git push origin main
git push origin v0.2.0Step 3: GitHub Actions takes over
The release workflow automatically:
- Runs pre-release quality gates
- Builds binaries for all platforms
- Generates changelog from commits
- Creates GitHub release with binaries
- Publishes crates to crates.io
Step 1: Update versions manually
# Workspace Cargo.toml
vim Cargo.toml # Update version
# All crate Cargo.toml files
vim crates/pforge-cli/Cargo.toml
vim crates/pforge-runtime/Cargo.toml
# ... (all 6 crates)
# Update lock file
cargo checkStep 2: Run quality gates
# Run all tests
cargo test --all --release
# Check clippy
cargo clippy --all-targets --all-features -- -D warnings
# Check formatting
cargo fmt --all -- --check
# Security audit
cargo auditStep 3: Commit and tag
git add -A
git commit -m "chore: bump version to 0.2.0"
git tag -a v0.2.0 -m "Release v0.2.0"Step 4: Push
git push origin main
git push origin v0.2.0- Go to Actions → Release workflow
- Click Run workflow
- Enter version (e.g.,
0.2.0) - Click Run workflow
This triggers the full release process without pushing a tag first.
Given version MAJOR.MINOR.PATCH:
- MAJOR: Incompatible API changes
- MINOR: Backwards-compatible functionality
- PATCH: Backwards-compatible bug fixes
Patch Release (0.1.0 → 0.1.1):
- Bug fixes
- Performance improvements
- Documentation updates
- No API changes
Minor Release (0.1.0 → 0.2.0):
- New features
- Deprecations (with warnings)
- Internal refactoring
- API additions (backwards-compatible)
Major Release (0.9.0 → 1.0.0):
- Breaking API changes
- Removed deprecated features
- Architectural changes
Cargo.toml:
[dependencies]
pforge-runtime = "0.1" # ^0.1.0 (any 0.1.x)
pforge-runtime = "0.1.5" # ^0.1.5 (>= 0.1.5, < 0.2.0)
pforge-runtime = "~0.1.5" # >= 0.1.5, < 0.2.0
pforge-runtime = "=0.1.5" # Exactly 0.1.5All releases must pass:
cargo test --all --release- Unit tests
- Integration tests (54 tests)
- Property-based tests (120K cases)
- Doc tests
Failure = Release Blocked
cargo clippy --all-targets --all-features -- -D warnings- Zero clippy warnings
- All lints enforced
Failure = Release Blocked
cargo fmt --all -- --check- Consistent formatting
- rustfmt config enforced
Failure = Release Blocked
cargo audit- Zero critical vulnerabilities
- Zero high-severity vulnerabilities
Failure = Release Blocked
cargo tarpaulin --out Html- Target: ≥80% line coverage
- Informational (doesn't block)
cargo bench --package pforge-runtime- Verify no performance regressions
- Informational (doesn't block)
After release workflow completes:
-
Check GitHub Release
- Navigate to: https://github.com/paiml/pforge/releases
- Verify binaries uploaded (5 platforms + checksums)
- Review auto-generated changelog
-
Check crates.io
- Visit: https://crates.io/crates/pforge-cli
- Verify new version published
- Check all 6 crates published successfully
-
Check docs.rs
- Visit: https://docs.rs/pforge-runtime
- Verify docs built for new version
-
Test Installation
cargo install pforge-cli pforge --version # Should show new version
-
GitHub Release Notes
- Auto-generated changelog is sufficient
- Optionally add release highlights manually
-
Social Media (Optional)
- Twitter/X announcement
- Reddit (r/rust)
- Discord community
-
Documentation Updates
- Update README badges if needed
- Update version references in docs
Track for 24-48 hours:
- GitHub Issues (bug reports)
- crates.io download stats
- docs.rs build status
For critical bugs in production:
git checkout -b hotfix/0.1.1 v0.1.0# Make minimal changes
vim src/critical_bug.rs
# Test the fix
cargo test./scripts/release.sh 0.1.1# Create PR or merge directly (emergency only)
git checkout main
git merge hotfix/0.1.1
# Push
git push origin main
git push origin v0.1.1If main has diverged significantly:
git checkout main
git cherry-pick <hotfix-commit-sha>Symptoms: GitHub Actions release workflow shows errors
Common Causes:
- Quality gates failed (tests, clippy, audit)
- Binary build failed (platform-specific issue)
- crates.io publish failed (version already exists)
Solutions:
- Fix quality gates: Address test/clippy failures locally
- Check build logs: Platform-specific dependencies might be missing
- Version conflict: Bump to next version, don't reuse
Symptoms: publish-crates job fails
Causes:
- Missing
CARGO_TOKENsecret - Version already published
- Dependency not available yet
Solutions:
# Verify token is set in GitHub Secrets
# Settings → Secrets → CARGO_TOKEN
# Check crates.io manually
# Dependency publishing order: macro → config → runtime → codegen → bridge → cli
# Wait 30 seconds between publishes (already in workflow)Symptoms: Release created but no binaries attached
Causes:
- Build job failed
- Asset upload failed
- Timeout
Solutions:
- Check build-release job logs
- Re-run failed jobs in GitHub UI
- Manually build and upload if needed
Symptoms: Installed version doesn't match release
Causes:
- Cargo cache
- crates.io index delay
Solutions:
# Clear cargo cache
cargo clean
rm -rf ~/.cargo/registry/cache
rm -rf ~/.cargo/git
# Update index
cargo search pforge-cli
# Force specific version
cargo install pforge-cli --version 0.2.0 --forceIf a release has critical issues:
cargo yank --vers 0.2.0 pforge-cli
cargo yank --vers 0.2.0 pforge-runtime
# ... (all crates)Note: Yanking prevents new downloads but doesn't break existing users
- Go to https://github.com/paiml/pforge/releases
- Click release to delete
- Click Delete release
- Keep the tag (don't delete)
Instead of deleting:
- Edit release
- Check Set as a pre-release
- Add warning to description
# Bump to next patch version
./scripts/release.sh 0.2.1
# Include fix and explanation in commitBefore releasing, ensure:
- All tests pass (
cargo test --all --release) - No clippy warnings (
cargo clippy --all-targets --all-features -- -D warnings) - Formatting correct (
cargo fmt --all -- --check) - No security issues (
cargo audit) - Version bumped in all Cargo.toml files
- Cargo.lock updated (
cargo check) - CHANGELOG.md updated (optional, auto-generated)
- Working directory clean (
git status) - On main branch (
git branch)
After releasing, verify:
- GitHub release created
- Binaries uploaded (5 platforms)
- Checksums uploaded
- Crates published to crates.io (all 6)
- Docs built on docs.rs
- Installation works (
cargo install pforge-cli) - Version correct (
pforge --version)
Last Updated: 2025-10-03 Maintained by: pforge team