ci: Harden release workflow#188
Conversation
|
we'll also do: |
|
Reviews (1): Last reviewed commit: "ci: extend release candidate artifact re..." | Re-trigger Greptile |
|
@PostHog/team-security this is where i wanna go |
|
Reviews (2): Last reviewed commit: "ci: address release workflow review feed..." | Re-trigger Greptile |
…ly-chain-hardening
posthog-php Compliance ReportDate: 2026-06-30 06:57:23 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
|
https://github.com/PostHog/posthog-php/settings/rules/18299376 |
💡 Motivation and Context
Harden the automated release workflow so release preparation and verification run separately from the approved publishing job. This reduces the blast radius of poisoned package/build tooling while preserving signed release commits via
planetscale/ghcommit-action.💚 How did you test it?
.github/workflows/release.ymlas YAML.git diff --check.pnpm exec changeset version,scripts/bump-version.shhash validation, patch generation, and patch application/version validation.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
This PR was authored with the pi coding agent. The implementation keeps signed release commits, but moves release candidate preparation and release-specific validation into read-only jobs before approval. The approved publishing job is intentionally minimal and no longer runs package-manager installs, tests, repository scripts, or notification actions beyond the required publish primitives. PHPUnit and public API checks remain covered by the existing
php.ymlworkflow rather than being duplicated in the release workflow.A hash check was added before running
scripts/bump-version.sh, release candidates are tied to the triggering commit, pre-existing tags/releases fail before approval, release candidate artifacts are retained for 5 days to allow weekend approvals, the generated patch file allowlist is checked during candidate preparation, recovery steps were documented inRELEASING.md, and a patch changeset was added so the new release workflow can be exercised after merge.