chore: guard release workflow version bumps#143
Closed
dustinbyrne wants to merge 2 commits into
Closed
Conversation
turnipdabeets
approved these changes
May 20, 2026
Contributor
Author
|
Updated after checking the actual failed attempt: #142's release did calculate 4.4.0 correctly, but the signed commit step hit a transient GitHub GraphQL |
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
The first failed release happened because
package.jsonwas introduced with stale release metadata (4.2.4) while the PHP SDK was already at4.3.0. Changesets usedpackage.jsonas the source of truth, calculated4.3.0as the next release, committed a version bump, and only then failed because the immutable4.3.0tag/release already existed.The rerun for #142 calculated the correct
4.4.0version, but failed while creating the signed version-bump commit via GitHub'screateCommitOnBranchGraphQL mutation with a transient GitHub server error:This hardens the release workflow against both failure modes:
package.json,composer.json, andlib/PostHog.phpversions are in sync before applying changesets.ghcommit-actionwrapper with a small localcreateCommitOnBranchscript that preserves GitHub-signed commits and retries transient GraphQL/server failures.mainref.💚 How did you test it?
Ran local checks for the new guards and commit script:
Also simulated the release changes from current
origin/main; dry-run detected the expected 4 additions/updates and 2 changeset deletions for the4.4.0release commit.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file