Skip to content

feat(release): stage artifacts for the bash installer, re-setup promote flow - #644

Merged
twitchyliquid64 merged 1 commit into
mainfrom
tom/progress
Jul 6, 2026
Merged

feat(release): stage artifacts for the bash installer, re-setup promote flow#644
twitchyliquid64 merged 1 commit into
mainfrom
tom/progress

Conversation

@twitchyliquid64

@twitchyliquid64 twitchyliquid64 commented Jul 6, 2026

Copy link
Copy Markdown
Member
  • Release workflow now stages artifacts ready for consumption by bash installer
  • Promote workflow now sets pointer file for bash installer

Summary by CodeRabbit

  • New Features

    • Added release staging and channel-switching support for installer builds.
    • Release workflows can now promote a staged version to either the stable or unstable channel.
    • The latest staged version can be selected automatically when no version is specified.
  • Bug Fixes

    • Improved validation and safety checks before moving a channel pointer.
    • Updated release handling to ensure installer artifacts and manifests are published in the expected layout.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds two new shell scripts, stage-release.sh and set-channel.sh, for staging release artifacts to GCS and flipping channel pointers. release.yml gains a stage-installer job invoking both scripts, while promote.yml replaces its platforms input with a target channel choice and rewrites promotion logic to resolve staged versions and call set-channel.sh.

Changes

Release Staging and Channel Promotion

Layer / File(s) Summary
Stage-release script
scripts/stage-release.sh
New script validates version, builds a component/artifact manifest with SHA-256 checksums, and uploads deduplicated artifacts and manifest to a versioned GCS path with immutable cache headers.
Set-channel script
scripts/set-channel.sh
New script validates channel/version inputs, verifies the version is staged, writes a pointer file, and uploads it to flip a channel, supporting --dry-run.
Release workflow staging job
.github/workflows/release.yml
Adds a stage-installer job that downloads artifacts, authenticates to GCP, runs stage-release.sh, and updates the unstable channel via set-channel.sh.
Promote workflow rewrite
.github/workflows/promote.yml
Replaces the platforms input with a target channel choice, updates the approval issue body, and rewrites the promote job to resolve staged SHAs and call set-channel.sh.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Release as release.yml
  participant Stage as stage-release.sh
  participant GCS as gs://minimal-one
  participant SetChan as set-channel.sh

  Release->>Stage: run with artifacts, short_sha
  Stage->>GCS: upload artifacts and components manifest
  Release->>SetChan: update unstable channel to short_sha
  SetChan->>GCS: verify staged version and upload pointer
  GCS-->>Release: staging and channel update confirmed
Loading
sequenceDiagram
  participant Approver
  participant Promote as promote.yml
  participant GCS as gs://minimal-one
  participant SetChan as set-channel.sh

  Approver->>Promote: dispatch sha, target (stable/unstable)
  Promote->>GCS: resolve latest staged SHA if empty
  Promote->>SetChan: run with channel, bucket, version
  SetChan->>GCS: verify staged version
  SetChan->>GCS: update channel pointer
  GCS-->>Promote: confirm promotion complete
Loading

Suggested reviewers: 0chroma, jtnkminimal, norrietaylor

Poem

A rabbit hops through buckets deep,
Staging shas while others sleep,
Flip the channel, stable or new,
Pointer files now dance on cue,
🐇✨ gs://minimal-one, hooray!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes to release staging and the promote flow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/promote.yml:
- Around line 180-196: In the promote workflow’s shell step, the fallback logic
in the SHA lookup block can be aborted by `set -e` when `gcloud storage ls -l
"gs://minimal-one/versions/*/components"` returns no matches. Update the
`LATEST` assignment in this block to handle the empty-list case defensively so
the script continues long enough to reach the existing `if [ -z "$LATEST" ]`
check and print the explicit “no staged versions found” error, while keeping the
`SHA`/`LATEST` fallback behavior in the same script section.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5b753622-a039-41f3-9b84-5bd994174ea5

📥 Commits

Reviewing files that changed from the base of the PR and between 4da49ab and 6045ea0.

📒 Files selected for processing (4)
  • .github/workflows/promote.yml
  • .github/workflows/release.yml
  • scripts/set-channel.sh
  • scripts/stage-release.sh

Comment thread .github/workflows/promote.yml
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