This repository uses Changesets for version management and an automated GitHub Actions workflow for releases.
When making changes that should be released, add a changeset:
pnpm changesetThis will prompt you to:
- Select the type of version bump (patch, minor, major)
- Write a summary of the changes
The changeset file will be created in the .changeset/ directory.
Create a PR with your changes and the changeset file(s).
When the PR is ready to be released, add the release label to it.
When the PR is merged to main, the release workflow will automatically:
- Check for changesets
- Notify the client libraries team in Slack for approval
- Wait for approval from a maintainer (via GitHub environment protection)
- Once approved:
- Apply changesets and bump the version
- Update the CHANGELOG.md
- Sync the version to
pubspec.yaml, iOS (PostHogFlutterVersion.swift), and Android (PostHogVersion.kt) - Commit the version bump to
main - Publish the package to pub.dev
- Create a git tag and GitHub release
You can also manually trigger the release workflow from the Actions tab by clicking "Run workflow".
Changesets handles version bumping automatically based on the changesets you create:
- patch: Bug fixes, documentation updates, internal changes (e.g.,
5.15.0→5.15.1) - minor: New features, non-breaking changes (e.g.,
5.15.0→5.16.0) - major: Breaking changes (e.g.,
5.15.0→6.0.0)
For pre-release versions (alpha, beta, RC), you can manually enter pre-release mode:
pnpm changeset pre enter alpha # or beta, rc
pnpm changeset versionTo exit pre-release mode:
pnpm changeset pre exitThe package is published as posthog_flutter on pub.dev.
If the release workflow fails with "No changesets found", ensure your PR includes at least one changeset file in the .changeset/ directory.
Make sure the PR has the release label applied before merging.
In case of automation failure, you can manually publish:
flutter pub get
cd posthog_flutter
flutter pub publish --forceYou'll need to be authenticated with pub.dev and have publish access to the package.