fix(ci): switch R2 upload from wrangler to AWS S3 CLI#730
Merged
Conversation
wrangler r2 object put has a 300 MiB hard limit. The Intel x64 DMG (303 MiB) now exceeds this, breaking nightly and release builds. Switch to aws s3 cp which uses S3-compatible multipart upload with no size limit. Also eliminates the per-upload npx wrangler download overhead. Requires R2_ACCESS_KEY_ID and R2_SECRET_ACCESS_KEY secrets.
nettee
approved these changes
Apr 1, 2026
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.
What
Replace
npx wrangler r2 object putwithaws s3 cpfor uploading desktop build artifacts to Cloudflare R2.Why
The Intel x64 DMG has grown to 303 MiB, exceeding wrangler's hard 300 MiB single-object upload limit. This broke the nightly Intel build (run #23826267155). ARM64 DMG is at 281 MiB and will hit the same wall soon.
How
npx wrangler r2 object puttoaws s3 cpin bothdesktop-build.ymlanddesktop-release.ymlaws s3 cpautomatically uses multipart upload for large files β no size limitawsCLI is pre-installed on GitHub macOS runners, no extra setup needednpx wrangler@4.79.0download overhead per upload callRequires new GitHub Secrets:
R2_ACCESS_KEY_IDβ from Cloudflare R2 API Token (S3 Auth)R2_SECRET_ACCESS_KEYβ from Cloudflare R2 API Token (S3 Auth)CLOUDFLARE_ACCOUNT_IDis reused for the endpoint URL. The existingCLOUDFLARE_API_TOKENis still used by the CDN cache purge step (unchanged).Affected areas
Checklist
anytypes introducedNotes for reviewers
Before merging, add
R2_ACCESS_KEY_IDandR2_SECRET_ACCESS_KEYto GitHub repo secrets. Create them in Cloudflare Dashboard β R2 β Manage R2 API Tokens β Create API Token (Object Read & Write, bucket:nexu-desktop-releases).