feat: cascade release zip to all lower stability channels #280

Closed
opened 2026-06-20 17:06:35 +00:00 by jmiller · 3 comments
Owner

Problem

Channel hierarchy: stable > rc > beta > alpha > dev

When a higher channel releases, lower channels still serve their old zip. A site on the dev channel never receives the rc build even though it is newer and should be available to all lower channels.

Expected Behavior

When a release is published, the same zip file should be attached to all lower channel release tags:

  • stable release: attach zip to stable, rc, beta, alpha, dev
  • rc release: attach zip to rc, beta, alpha, dev
  • beta release: attach zip to beta, alpha, dev
  • alpha release: attach zip to alpha, dev
  • dev release: attach zip to dev only

The lower channel releases should have their assets replaced with the higher channel zip (same file, same SHA-256). The updates.xml feed for each channel should reflect the new version so Joomla updater picks it up.

Current Behavior

release_cascade.php deletes lesser pre-release tags but does not re-upload the artifact to them. Lower channels go stale until their own build triggers independently.

Suggested Fix

In release_cascade.php (or a new release_propagate.php):

  1. After building a release, iterate all lower channel tags
  2. Create or update each lower release tag via Gitea API
  3. Delete existing assets on that release, upload the current zip
  4. Update the release name/body to reflect the propagated version

This ensures every channel always serves the latest available build from its level or above.

## Problem Channel hierarchy: stable > rc > beta > alpha > dev When a higher channel releases, lower channels still serve their old zip. A site on the dev channel never receives the rc build even though it is newer and should be available to all lower channels. ## Expected Behavior When a release is published, the **same zip file** should be attached to all lower channel release tags: - **stable** release: attach zip to stable, rc, beta, alpha, dev - **rc** release: attach zip to rc, beta, alpha, dev - **beta** release: attach zip to beta, alpha, dev - **alpha** release: attach zip to alpha, dev - **dev** release: attach zip to dev only The lower channel releases should have their assets replaced with the higher channel zip (same file, same SHA-256). The updates.xml feed for each channel should reflect the new version so Joomla updater picks it up. ## Current Behavior release_cascade.php deletes lesser pre-release tags but does **not** re-upload the artifact to them. Lower channels go stale until their own build triggers independently. ## Suggested Fix In release_cascade.php (or a new release_propagate.php): 1. After building a release, iterate all lower channel tags 2. Create or update each lower release tag via Gitea API 3. Delete existing assets on that release, upload the current zip 4. Update the release name/body to reflect the propagated version This ensures every channel always serves the latest available build from its level or above.
Author
Owner

Branch created: feature/280-feat-cascade-release-zip-to-all-lower-st

git fetch origin
git checkout feature/280-feat-cascade-release-zip-to-all-lower-st
Branch created: [`feature/280-feat-cascade-release-zip-to-all-lower-st`](https://git.mokoconsulting.tech/MokoConsulting/mokoplatform/src/branch/feature/280-feat-cascade-release-zip-to-all-lower-st) ```bash git fetch origin git checkout feature/280-feat-cascade-release-zip-to-all-lower-st ```
Author
Owner

Additional Constraint: Protected Branches

All channel branches (main, rc, beta, alpha, dev) are protected -- direct pushes are not allowed. The cascade must work within this constraint:

  • Artifact cascade (uploading the zip to lower release tags) can use the Gitea releases API directly since it only modifies release assets, not branch content
  • Version sync that requires commits (updating manifest versions) must go through PRs, not direct pushes
  • The workflow should either create and auto-merge PRs for version sync, or avoid needing commits entirely by only cascading the zip artifact and updating release metadata
## Additional Constraint: Protected Branches All channel branches (main, rc, beta, alpha, dev) are protected -- direct pushes are not allowed. The cascade must work within this constraint: - **Artifact cascade** (uploading the zip to lower release tags) can use the Gitea releases API directly since it only modifies release assets, not branch content - **Version sync** that requires commits (updating manifest versions) must go through PRs, not direct pushes - The workflow should either create and auto-merge PRs for version sync, or avoid needing commits entirely by only cascading the zip artifact and updating release metadata
Author
Owner

Implemented in cli/release_cascade.php — pushed to main.

How it works:

  1. Receives --stability (the channel that just released), --token, --api-base
  2. Determines all lower channels in the hierarchy: stable > rc > beta > alpha > dev
  3. Downloads the source release's zip + sha256 sidecar assets to temp files
  4. For each lower channel tag:
    • Finds existing release or creates one
    • Deletes old assets
    • Uploads the source zip(s)
    • Updates release name/body to match the source
  5. No branch commits needed — uses Releases API only, works with protected branches

CLI interface unchanged — same --stability, --token, --api-base args as before, so no workflow changes required. The pre-release workflow's cascade step just works now instead of being a no-op.

Implemented in `cli/release_cascade.php` — pushed to main. **How it works:** 1. Receives `--stability` (the channel that just released), `--token`, `--api-base` 2. Determines all lower channels in the hierarchy: stable > rc > beta > alpha > dev 3. Downloads the source release's zip + sha256 sidecar assets to temp files 4. For each lower channel tag: - Finds existing release or creates one - Deletes old assets - Uploads the source zip(s) - Updates release name/body to match the source 5. No branch commits needed — uses Releases API only, works with protected branches **CLI interface unchanged** — same `--stability`, `--token`, `--api-base` args as before, so no workflow changes required. The pre-release workflow's cascade step just works now instead of being a no-op.
Sign in to join this conversation.
No labels
Priority Medium
Type Feature
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/mokocli#280