Add label-driven release workflow - #157
Conversation
posthog-dotnet Compliance ReportDate: 2026-02-25 22:16:27 UTC ✅ All Tests Passed!29/29 tests passed Capture Tests✅ 29/29 tests passed View Details
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a label-driven automated release workflow for posthog-dotnet, replacing the manual release process with a GitHub Actions workflow that handles version bumping, tagging, and publishing when PRs with specific labels are merged to main. The workflow includes Slack notifications, environment-based approval gates, and PostHog observability.
Changes:
- Added automated release workflow triggered by PR labels (
release+bump-{patch,minor,major}) - Renamed manual release script from
bin/releasetobin/release-localas a fallback option - Updated README documentation to reflect the new label-driven release process
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 11 comments.
| File | Description |
|---|---|
.github/workflows/release.yml |
New automated release workflow with Slack notifications, approval gates, version bumping, and GitHub Release creation |
bin/release-local |
Renamed from bin/release - manual fallback script for local release preparation |
README.md |
Updated release process documentation to describe label-driven workflow and manual fallback |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add a GitHub Actions release workflow matching the SDK release process
used by posthog-go. Triggered by PR labels (release + bump-{type}),
with GitHub Environment approval gate and Slack notifications.
The workflow bumps the version in Directory.Build.props, builds, tests,
commits to main via a GitHub App token, creates a tag and GitHub Release
with auto-generated notes, which triggers the existing main.yaml
workflow to publish to NuGet.
Also renames bin/release to bin/release-local as a manual fallback and
updates main.yaml to use actions/setup-dotnet@v4 consistently.
4352405 to
d863bff
Compare
|
All one-time steps above completed! |
Summary
Add a label-driven release workflow matching the SDK release process, adapted from posthog-go.
Changes
.github/workflows/release.yml— Triggered when a PR withrelease+bump-{patch,minor,major}labels is merged tomain. The workflow:#approvals-client-librariesin Slack requesting approvalReleaseGitHub Environment gate for maintainer approvalDirectory.Build.props, builds, testsmainvia a GitHub App tokenmain.yamlworkflow to publish to NuGetbin/release→bin/release-localas a manual fallbackIntentional differences from posthog-go
id-token: writepermission (NuGet publishing happens inmain.yaml, not here)gh release create --generate-notesinstead)gh release createinstead of rawgh apifor creating releasesOne-time setup required
Per the SDK releases handbook:
Releaser (posthog-dotnet)withContents: Read and write, install on this repo onlyReleaseenvironment withPostHog/client-libraries-approversandPostHog/team-client-librariesas required reviewers, self-review prevention enabledGH_APP_POSTHOG_DOTNET_RELEASER_APP_IDandGH_APP_POSTHOG_DOTNET_RELEASER_PRIVATE_KEYSLACK_CLIENT_LIBRARIES_BOT_TOKEN,POSTHOG_PROJECT_API_KEY,GROUP_CLIENT_LIBRARIES_SLACK_GROUP_ID,SLACK_APPROVALS_CLIENT_LIBRARIES_CHANNEL_IDrelease,bump-patch,bump-minor,bump-majorTest plan
release+bump-patchlabels#approvals-client-librariesmain, git tag, GitHub Release with auto-generated notesmain.yamltriggers and publishes to NuGet