Skip to content

ci: add PostHog release annotations#332

Merged
rhuanbarreto merged 1 commit into
mainfrom
feat/posthog-release-annotations
May 23, 2026
Merged

ci: add PostHog release annotations#332
rhuanbarreto merged 1 commit into
mainfrom
feat/posthog-release-annotations

Conversation

@rhuanbarreto

Copy link
Copy Markdown
Contributor

Summary

  • Adds a step to the release workflow that creates a PostHog annotation on each release, so version markers (e.g. v0.38.0) appear as vertical lines on all timeline graphs
  • Uses the PostHog Annotations API (POST /api/projects/{id}/annotations/) with creation_type: "GIT" for automated tagging
  • continue-on-error: true ensures annotation failures never block a release
  • Gracefully skips when secrets are not configured (safe for forks)

Setup required

Two new GitHub settings must be configured before annotations appear:

  1. Secret POSTHOG_PERSONAL_API_KEY — a PostHog personal API key with annotations write scope (Settings → Personal API Keys)
  2. Variable POSTHOG_PROJECT_ID — the numeric project ID from the PostHog dashboard URL

Test plan

  • Verify POSTHOG_PERSONAL_API_KEY and POSTHOG_PROJECT_ID are set in the repo
  • Trigger a release and confirm the annotation appears in PostHog timeline views
  • Verify the step logs ::notice::PostHog annotation created for v<version>
  • Confirm the release succeeds even if PostHog API is unreachable (continue-on-error)

Create a PostHog annotation on each release so version markers
appear on timeline graphs. Uses the PostHog Annotations API with
a personal API key (POSTHOG_PERSONAL_API_KEY secret) and project
ID (POSTHOG_PROJECT_ID variable). The step is continue-on-error
so annotation failures never block a release, and gracefully skips
when the secrets are not configured.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: dc43e38
Status: ✅  Deploy successful!
Preview URL: https://ae73eb0e.archgate-cli.pages.dev
Branch Preview URL: https://feat-posthog-release-annotat.archgate-cli.pages.dev

View logs

@rhuanbarreto rhuanbarreto merged commit af42c5e into main May 23, 2026
10 checks passed
@rhuanbarreto rhuanbarreto deleted the feat/posthog-release-annotations branch May 23, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant