Auto-publish CLI builds to Cloudflare R2 - #5
Open
echobt wants to merge 1 commit into
Open
Conversation
echobt
marked this pull request as ready for review
August 30, 2026 09:32
Wire release.yml to call publish-r2.yml after a successful tag or dispatch release. Upload archives, checksums, release JSON, and checksum-verifying installers to software.cortex.foundation. Teach cortex upgrade to parse the static R2 manifest layout. Co-authored-by: Mathis <echobt@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/auto-publish-cli-r2-3be4
branch
from
August 30, 2026 09:35
31d4c02 to
af91a15
Compare
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.
Summary
After a successful GitHub Release, Cortex CLI binaries are automatically published to software.cortex.foundation (Cloudflare R2 bucket
cortex-software).cortex upgradeand the documentedcurl | sh/irm | iexinstallers consume that same layout and verify SHA-256.This is not an AWS/OIDC path. No
github-production-deployrole, no AWS keys, no new GitHub Actions variables.Rebased onto current
main(includes #4 mascot / welcome card anddocs/media/intro.gif). Install notes live indocs/guides/getting-started.md— the olddocs/user-guide.mdwas already removed on main.What fires on tag
main→.github/workflows/version-bump.ymlpatch-bumps and pushesvX.Y.Z.v*/cli-v*(orworkflow_dispatchon Release) →.github/workflows/release.ymlbuilds platform archives and creates a GitHub Release.publishjob alwaysworkflow_calls.github/workflows/publish-r2.ymlafterreleasesucceeds. Artifacts are pulled from the caller run viarelease_run_id.-) go to thebetachannel; otherwisestable.Manual republish:
workflow_dispatchonpublish-r2.ymlwithversion+ the release workflow’srelease_run_id.Secrets to set (no vars)
On
CortexLM/cli(seedocs/CI_SECRETS.md):R2_ACCESS_KEY_IDcortex-softwareR2_SECRET_ACCESS_KEYCLOUDFLARE_ACCOUNT_IDhttps://$CLOUDFLARE_ACCOUNT_ID.r2.cloudflarestorage.comDo not add AWS keys,
PRODUCTION_DEPLOY_ENABLED, orPRODUCTION_SOFTWARE_BUCKET. If these R2 secrets are missing, the GitHub Release still exists and the publish job fails with a clear error.URL map
Bucket root = host root.
https://software.cortex.foundation/install.shhttps://software.cortex.foundation/install.ps1https://software.cortex.foundation/releases/manifest.jsonhttps://software.cortex.foundation/releases/<version>.jsonhttps://software.cortex.foundation/v1/assets/<platform>/<version>/cortex.tar.gzhttps://software.cortex.foundation/v1/assets/windows-x86_64/<version>/cortex.zip.sha256Aliases for
cortex upgrade:/v1/releases/manifest.json,/v1/releases/<version>.json,/v1/releases/latest.json.Platform keys:
linux-x86_64,linux-aarch64,darwin-x86_64,darwin-aarch64,windows-x86_64.Installers detect arch, download the matching asset, require SHA-256 verification, and install to
~/.local/binor%LOCALAPPDATA%\Cortex\bin.cortex upgradeuses the sameReleaseInfoJSON (fixture-tested against a samplemanifest.json).Test plan
cargo fmt --all -- --check./scripts/clippy.sh(workspace clippy completed with-D warnings)cargo test -p cortex-update(includes fixture manifest + wiremock fallback)cargo test -p cortex-engine --lib github::workflowcargo test -p cortex-cli --lib upgrade_cmdcargo test --workspace(full suite; CI on this PR)cargo audit(CI)Attestation (required)
I attest that:
cortex upgraderefuse to install without a SHA-256 match. HTTPS required except localhost. No AWS keys. rclone config is written from secrets at job runtime.software.cortex.foundation, not providers or SDKs.ReleaseManifestfixture parse, wiremockget_latestfallback to/v1/releases/manifest.json,get_releaseversion JSON,find_binaryforCortex, install-script checksum assertion. No mock-success..envfiles are included.Risk
Release pipeline: a missing R2 secret fails the publish job (GitHub Release already created). JSON layout matches existing
cortex-updatetypes; aliases keep/v1/releases/...working on static object storage. First production publish needs DNS forsoftware.cortex.foundationpointed at the R2 bucket (out of this PR).