This repository uses Changesets for version management and changelog generation, with GitHub Actions publishing posthog-ruby and posthog-rails to RubyGems.
The gems are versioned and released independently. Add the changeset to the package that changed (posthog-ruby or posthog-rails); if both changed, select both packages. posthog-rails is not bumped automatically when posthog-ruby changes, so Rails releases must be selected intentionally.
When making changes that should be released, add a changeset:
pnpm changesetThis will prompt you to:
- select the changed package or packages (
posthog-rubyand/orposthog-rails) - select the release type (
patch,minor, ormajor) for each package - write a summary of the change
The changeset file will be created in the .changeset/ directory.
Create a PR with your code changes and the changeset file.
No release label is required. When the PR is merged to main, the release workflow will automatically:
- Check for pending changesets
- Notify the Client Libraries team in Slack for approval
- Wait for approval via the GitHub
Releaseenvironment - Once approved:
- Apply changesets and bump the changed package
package.jsonfiles - Update the changed package changelog (
posthog-ruby/CHANGELOG.mdorposthog-rails/CHANGELOG.md) - Sync package versions to the Ruby version files
- Commit the version bump to
main - Publish only the packages whose versions changed
- Create package-specific git tags and GitHub releases, for example
posthog-ruby-v3.13.1orposthog-rails-v3.14.0
- Apply changesets and bump the changed package
When both packages changed, the workflow publishes posthog-ruby first, then posthog-rails, since posthog-rails depends on posthog-ruby. The Rails gemspec pins its posthog-ruby dependency to the exact core SDK version present in the release commit, so Rails-only releases intentionally keep using the latest core SDK version recorded on main.
You can also manually trigger the release workflow from the Actions tab, as long as there are pending changesets.