chore: align Python release publishing with Ruby#716
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "chore: align Python release publishing w..." | Re-trigger Greptile |
Contributor
posthog-python Compliance ReportDate: 2026-07-01 07:30:51 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
ioannisj
approved these changes
Jul 1, 2026
1a0d989 to
163b8b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Align the split Python release workflow with the Ruby release workflow so publish-time tag creation uses the checkout credentials instead of an explicit
GH_TOKEN, while keepinggh release createauthenticated with${{ github.token }}like Ruby.The publish job now configures git, fetches tags, skips package releases when the expected tag already exists, creates annotated tags with git, and creates GitHub releases from a generated
release-notes.mdfile. The release-notes extraction preserves the fallback text when the latest changelog section is missing or empty.The root
CHANGELOG.mdnow mirrors Ruby's package index pattern and points to the package-specific changelogs. The historicalposthogchangelog moved toposthog/CHANGELOG.md, and the release workflow copies it into the root only while runningsampo release, then moves the generated changelog back toposthog/CHANGELOG.mdand restores the root index.RELEASING.mdis updated to document all published packages, package-specific changelog locations, and package-prefixed release tags.This also includes a patch changeset for both
posthogandopenfeature-provider-posthogso the updated release flow can be exercised after merge.💚 How did you test it?
.github/workflows/release.ymlwith PyYAML.sampo releasechangelog relocation flow in a temporary clone with a temporary changeset and confirmed the root changelog stays as an index whileposthog/CHANGELOG.mdreceives the generated entry.SAMPO_RELEASE_BRANCH=main sampo release --dry-runwith the committed changeset and confirmed planned patch releases for both packages.git diff --check.📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Pi was used to compare the Python release workflow with the Rust and Ruby release workflows, then update Python's publish job to follow Ruby's multi-job release pattern more closely. The key decisions were to keep the default workflow token in the publish job, remove explicit token wiring from tag creation, use git-based annotated tags plus release notes files like Ruby, make the root changelog an index to the package-specific changelogs, document the multi-package release setup, include a small changeset to test the release workflow after merge, and preserve fallback release notes when the latest changelog section is empty.