Contribute to Twirp-Ruby
April 30, 2025 ยท View on GitHub
Issues and Pull Requests
Features and bugfixes are managed through GitHub's Issues and Pull Requests. Contributions are welcome and once approved, they are merged into master.
Run tests and example code
- Install gems:
bundle install - Run Ruby tests:
rake - Run Go tests (test code generation):
go test ./protoc-gen-twirp_ruby/... ./internal/gen/typemap/... - Run example code (see example/README.md).
Release Process
The Ruby and Go components now have separate release processes. They are no longer coupled in terms of versioning.
- Ruby library follows Semantic Versioning (SemVer), using tags like
ruby-v1.13.0 - Go library follows Go module versioning conventions
Both components can be released using GitHub Actions workflows.
Ruby Release Process
-
Update the version in
lib/twirp/version.rbfollowing semantic versioning. -
Commit and push these changes to the main branch:
git commit -am "Bump Ruby version to vX.Y.Z" git push origin main -
Go to the Actions tab in the GitHub repository and select the "Ruby Release" workflow.
-
Click "Run workflow" and provide:
- Version: The version number without the 'v' prefix (e.g., "1.13.0")
-
Click "Run workflow" to start the release process.
The workflow will:
- Run all Ruby tests
- Create a Git tag with format
ruby-vX.Y.Z - Create a GitHub Release
-
Run
bundle exec rake releaselocally to push the gem -
Verify the gem is available at https://rubygems.org/gems/twirp
Go Release Process
-
Update the version in
protoc-gen-twirp_ruby/version.gofollowing semantic versioning. -
Commit and push these changes to the main branch:
git commit -am "Bump Go version to vX.Y.Z" git push origin main -
Go to the Actions tab in the GitHub repository and select the "Go Release" workflow.
-
Click "Run workflow" and provide:
- Version: The version number without the 'v' prefix (e.g., "1.13.0")
-
Click "Run workflow" to start the release process.
The workflow will:
- Run all Go tests
- Create Git tags with formats
go-vX.Y.ZandvX.Y.Z(for Go modules compatibility) - Create a GitHub Release
- Verify the release is visible on the GitHub Releases page
General Notes
- The two components can be released independently according to their own development schedules
- Always test both Ruby and Go components before releasing either one
- Update the
RELEASE_NOTES.mdfile with significant changes for both Ruby and Go releases - The GitHub workflows automate most of the release process but still require manual version updates