- Create a crates.io token:
cargo loginFor GitHub Actions, add the token as repository secret CARGO_REGISTRY_TOKEN.
- Create a Homebrew tap repository:
gh repo create 0x12th/homebrew-pytree --publicCopy homebrew-pytree/Formula/pytree.rb from this repository into the tap.
cargo fmt-check
cargo typecheck
cargo lint
cargo qa
cargo package-checkTo inspect the publish payload:
cargo package --locked --listManual publish:
cargo login
cargo package --locked
cargo publish --lockedThe release workflow also runs cargo publish --locked when a version tag is pushed.
Release 0.1.0:
git switch master
git pull --ff-only
cargo package --locked
git tag -a v0.1.0 -m "v0.1.0"
git push origin v0.1.0The Release workflow creates the GitHub Release and uploads:
pytree-v0.1.0-macos-arm64.tar.gzpytree-v0.1.0-macos-x86_64.tar.gzpytree-v0.1.0-linux-x86_64.tar.gzpytree-v0.1.0-windows-x86_64.zip
It publishes to crates.io before creating the GitHub Release. If crates.io publish fails, the release assets are not uploaded.
After the GitHub Release has assets, compute checksums:
VERSION=0.1.0
curl -LO https://github.com/0x12th/pytree/releases/download/v$VERSION/pytree-v$VERSION-macos-arm64.tar.gz
curl -LO https://github.com/0x12th/pytree/releases/download/v$VERSION/pytree-v$VERSION-macos-x86_64.tar.gz
shasum -a 256 pytree-*.tar.gzUpdate the formula in 0x12th/homebrew-pytree:
./scripts/update-homebrew-formula.sh 0.1.0 ../homebrew-pytree
brew audit --strict Formula/pytree.rb
brew test Formula/pytree.rb
git add Formula/pytree.rb
git commit -m "pytree 0.1.0"
git pushInstall command:
brew tap 0x12th/pytree
brew install pytree