This document outlines the steps to publish DotState to various package managers and platforms.
- Update version in
Cargo.toml - Update
CHANGELOG.mdwith release notes - Update
README.mdif needed - Run full test suite:
cargo test - Run clippy:
cargo clippy -- -D warnings - Check formatting:
cargo fmt -- --check - Build release:
cargo build --release - Test release binary locally
- Create git tag:
git tag -a v0.1.0 -m "Release v0.1.0" - Push tag:
git push origin v0.1.0
- Create account on crates.io
- Get API token from account settings
- Login:
cargo login YOUR_API_TOKEN
- Publish:
cargo publish
Note: Publishing to crates.io is permanent. Make sure everything is correct!
- Fork homebrew-core (or create your own tap)
- Create formula in
Formula/dotstate.rb - Calculate SHA256:
# After creating a release on GitHub wget https://github.com/serkanyersen/dotstate/archive/v0.1.0.tar.gz shasum -a 256 v0.1.0.tar.gz - Update formula with the SHA256
- Test locally:
brew install --build-from-source Formula/dotstate.rb
- Submit PR to homebrew-core (or merge to your tap)
-
Create repository
homebrew-dotstateon GitHub -
Add formula to the repository
-
Users install with:
brew tap serkanyersen/dotstate brew install dotstate
Or use the direct install:
brew install serkanyersen/dotstate/dotstate
- Create release on GitHub:
- Go to Releases → Draft a new release
- Tag:
v0.1.0 - Title:
v0.1.0 - Description: Copy from
CHANGELOG.md
- Upload binaries (optional, for direct downloads):
- Build for multiple platforms
- Upload
.tar.gzor.zipfiles
- Publish release
# Build for Apple Silicon
cargo build --release --target aarch64-apple-darwin
# Build for Intel
cargo build --release --target x86_64-apple-darwin# Build for x86_64
cargo build --release --target x86_64-unknown-linux-gnu
# Or use Docker for consistent builds
docker run --rm -v $(pwd):/app -w /app rust:latest cargo build --releaseInstall cross-compilation targets:
rustup target add aarch64-apple-darwin
rustup target add x86_64-unknown-linux-gnuWhen releasing a new version:
-
Update
Cargo.toml:version = "0.1.1"
-
Update
CHANGELOG.md:- Move items from
[Unreleased]to new version section - Add release date
- Move items from
-
Commit and tag:
git add Cargo.toml CHANGELOG.md git commit -m "Bump version to 0.1.1" git tag -a v0.1.1 -m "Release v0.1.1" git push origin main --tags
- Announce on social media (if desired)
- Update documentation if needed
- Monitor issues and feedback
- Plan next release