Brazilian data utilities (CPF, CNPJ, etc.) as a multi-gem monorepo, publishable to RubyGems with independent versioning and GitHub Actions (Trusted Publishing / OIDC).
- Root: Tooling (Rake, RuboCop), shared config in
config/gems.yml, no app code. - Packages: Under
packages/— each is a gem (e.g.cpf-dv,cpf-utilities,br-utilities). Internal dependencies use path in development and version constraints when published.
See MONOREPO.md for folder layout, tagging, dependency resolution, and risks.
bundle install
rake monorepo:check_cycles
cd packages/cpf-dv && bundle install && rake test- Bump version in
packages/<dir>/src/<gem_name>/version.rb, commit. - Push tag:
git tag <gem_name>@<version>(e.g.cpf-dv@1.0.1), thengit push origin <tag>. - Configure RubyGems Trusted Publishing for this repo and the
releaseenvironment. - The Release workflow runs: tests the package, builds the gem, publishes to RubyGems via OIDC. No secrets required.
Release leaves first (e.g. cpf-dv, cpf-fmt), then dependents (cpf-utilities, cnpj-utilities), then br-utilities.
MIT. See LICENSE.
