Skip to content

(feat): add Split Dev workflow for publishing feature-branch splits#57

Merged
ChiragAgg5k merged 2 commits into
mainfrom
feat/split-dev-workflow
Jul 9, 2026
Merged

(feat): add Split Dev workflow for publishing feature-branch splits#57
ChiragAgg5k merged 2 commits into
mainfrom
feat/split-dev-workflow

Conversation

@ChiragAgg5k

Copy link
Copy Markdown
Member

What

Adds a manually dispatched Split Dev workflow that publishes a feature branch's split of one or more packages to their read-only mirrors, restoring the pre-monorepo unblock flow: a consumer (e.g. Appwrite) can composer require utopia-php/<name>:dev-<branch> from Packagist before the branch is merged or released.

How

  • Actions → Split Dev → Run workflow on the feature branch, with inputs package (space-separated names) and action (publish | delete).
  • publish reuses the existing bin/monorepo split <pkg> --branch=<branch> --force with the same split-app token as the regular Split workflow — no bin/monorepo changes needed. --force because rebases change the synthesized split history.
  • delete removes the mirror branch once the work merges or is abandoned.
  • The run summary prints a copy-pasteable consumer requirement, aliasing into the latest released minor (dev-my-branch as 2.0.999) so sibling constraints keep resolving; unreleased packages fall back to plain dev-<branch>.
  • Refuses to run on main (that's the regular Split's job). Mirror rulesets only target the default branch, so dev branches need no ruleset changes.
  • Docs: new "Dev branches" section in docs/distribution.md, pointer in the README's cross-package section.

Verification

  • Workflow YAML parses.
  • bin/monorepo split http di --branch=test-branch --dry-run synthesizes both split heads.
  • Summary alias snippet tested for released (httpas 2.0.999) and unreleased (nats) packages.
  • Needs one live dispatch post-merge to confirm the app token creates mirror branches and Packagist picks them up.

Dispatching Split Dev on a feature branch pushes the named packages'
splits to their mirrors under the same branch name, so consumers can
require utopia-php/<name>:dev-<branch> from Packagist before merge --
restoring the pre-monorepo unblock flow. action=delete removes the
mirror branch when done.
@greptile-apps

greptile-apps Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a manually-dispatched Split Dev workflow that lets contributors push a feature branch's package split to the mirror repos, enabling external consumers to composer require utopia-php/<name>:dev-<branch> before the branch is merged or released.

  • New workflow (.github/workflows/split-dev.yml): supports publish (calls bin/monorepo split ... --force) and delete (removes the mirror branch via refspec deletion); the delete loop uses if/else to continue past individual failures and exits non-zero only if at least one deletion failed. The run summary generates a copy-pasteable inline-alias requirement, filtering pre-release tags with grep -v -- - before computing the alias.
  • Docs/README: a new "Dev branches" section in docs/distribution.md documents the dispatch flow, inline-alias rationale, force-push requirement, and cleanup steps; README.md adds a short pointer.

Confidence Score: 5/5

Safe to merge — the workflow is additive, touches no existing logic, and is manually dispatched only by users with write access.

The implementation is self-contained and consistent with the existing split.yml patterns (pinned SHA actions, SPLIT_REMOTE_BASE env var for token, persist-credentials: false). The delete loop correctly uses if/else to survive partial failures without triggering bash exit-on-error, and the version-alias logic filters pre-release tags before computing the alias. No existing workflows or release paths are affected.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/split-dev.yml New manually-dispatched workflow for publishing/deleting feature-branch splits to mirror repos; delete loop uses if/else to survive partial failures, version aliasing filters pre-releases with grep -v, all well-structured
README.md Adds one-line pointer to Split Dev workflow for external consumers needing an unmerged branch
docs/distribution.md New Dev branches section documents the dispatch flow, inline-alias pattern, force-push rationale, and cleanup steps accurately

Reviews (2): Last reviewed commit: "(fix): harden split-dev delete loop and ..." | Re-trigger Greptile

Comment thread .github/workflows/split-dev.yml
Comment thread .github/workflows/split-dev.yml Outdated
Address review: the delete loop now continues past a failed push
(warning per package, non-zero exit at the end) instead of stranding
remaining mirror branches under bash -e, and the summary alias anchors
to the newest stable tag so a pre-release on a newer major cannot
hoist it, falling back to the newest tag for rc-only packages.
@ChiragAgg5k ChiragAgg5k merged commit 79fc522 into main Jul 9, 2026
28 checks passed
@ChiragAgg5k ChiragAgg5k deleted the feat/split-dev-workflow branch July 9, 2026 07:56
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.

2 participants