Skip to content

Downloads come from Cloudflare R2, so no GitHub access is needed - #26

Merged
progremir merged 3 commits into
mainfrom
claude/app-downloader-hosting-cf6937
Oct 26, 2026
Merged

progremir merged 3 commits into
mainfrom
claude/app-downloader-hosting-cf6937

Conversation

@progremir

@progremir progremir commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

Why

The repository is private, so every Download button on hyperpoint.progremir.dev led to github.com/progremir/hyperpoint/releases/latest. That page shows 404 to anyone who isn't a collaborator, with or without a GitHub account.

What changed

Downloads are served from R2 by the site's own Worker.

  • The DMGs live in a new private R2 bucket, hyperpoint-releases. It has no public URL; only the Worker reads it.
  • site/src/index.ts runs only for /download and /download/* (runWorkerFirst). Every other path is still a static asset.
    • /download redirects (302, no-store) to the file the bucket's latest object names, so the saved file carries its version.
    • /download/Hyperpoint-<version>.dmg and its .sha256 serve that release, with an ETag and immutable caching.
    • latest, other keys, missing versions and unknown paths get the site's 404 page. Methods other than GET and HEAD get 405.
  • wrangler.jsonc, which Workers Builds reads for both main and branch previews, and cloudflare.config.ts, for cf deploy from a Mac, both gain the entry, the ASSETS and RELEASES bindings and the runWorkerFirst routes. Previews bind the same bucket in wrangler.jsonc's previews block.
  • Every Download link, the SoftwareApplication downloadUrl and the privacy page now point at /download.

scripts/release.sh --publish uploads to the bucket. After gh release create, it uploads the DMG and its SHA-256, then moves latest, which a prerelease leaves alone. Before building, it checks that it can read the bucket, so a missing Cloudflare sign-in stops it before the 30-minute notarization. The one-time setup, npm ci && npx cf auth login in site/, is in the README.

v0.1.1 is already in the bucket. Its MD5 matches the GitHub release's DMG, which passes shasum -c and spctl as Notarized Developer ID.

No GitHub Actions. .github/workflows/release.yml built an ad-hoc DMG on a GitHub macOS runner when a PR touched the release pipeline. It was the repository's last workflow, and GitHub refused to start it here because of a billing or spending-limit problem on the account. The README's Releasing section now gives the same check to run on a Mac before merging a pipeline change. The comments in build-app.sh and release.sh that named CI now say what the ad-hoc build and the hdiutil retry are for.

Checked

With wrangler dev on a local bucket holding the same three objects:

  • /download and /download/ redirect to /download/Hyperpoint-0.1.1.dmg.
  • That file arrives as application/x-apple-diskimage, 1,247,215 bytes, with Content-Length and the release's SHA-256.
  • The .sha256 file is served too.
  • /download/latest and /download/Hyperpoint-9.9.9.dmg get the branded 404 page, and POST /download gets 405.
  • /, /privacy and a 404 behave as before, with no console or server errors.
  • cf build and wrangler deploy --dry-run both list the R2 and assets bindings.

On this branch's preview (https://claude-app-downloader-hosting-cf6937-hyperpoint.progremir.workers.dev), against the real bucket and with no GitHub credentials:

  • /download redirects to Hyperpoint-0.1.1.dmg with no-store.
  • The file arrives as application/x-apple-diskimage, 1,247,215 bytes, with the release's SHA-256. spctl accepts it as Notarized Developer ID.
  • /download/latest and a missing version return 404, POST returns 405, and /, /privacy and the 404 page work as before.

That's Workers Builds' own preview of 9ae6885, built with npx wrangler preview. Its build of 86b6410 deployed but returned 1101 on /download, because previews inherit no bindings. 9ae6885 adds the bucket to wrangler.jsonc's previews block, and the build no longer warns about a missing binding.

Production builds run npx wrangler deploy and read the same wrangler.jsonc, where the top-level entry, bindings and run_worker_first routes are set. The site README now names the commands Workers Builds actually runs.

SIGN_IDENTITY=- ALLOW_ADHOC=1 scripts/release.sh 0.2.0-check, the local check the README now documents, built and verified the DMG in 22 seconds.

Not changed

The footer's Release notes and Source code links, the config-skill links and "Open an issue" still go to the private repository.

🤖 Generated with Claude Code

The repository is private, so the Download buttons led to a releases page
that shows 404 to anyone who is not a collaborator, with a GitHub account
or without. The DMGs now live in the private hyperpoint-releases R2 bucket
and the site serves them: /download redirects to the release the bucket's
`latest` object names, and /download/Hyperpoint-<version>.dmg and its
.sha256 serve that release. A small Worker runs only for /download paths;
the rest of the site stays static assets, and any other key or path gets
the 404 page.

release.sh --publish uploads each release to the bucket after the GitHub
release and moves `latest` last, except for a prerelease. It checks it can
read the bucket before building, so a missing Cloudflare sign-in stops it
before notarization. v0.1.1 is already uploaded, matched by MD5.

Checked with wrangler dev on a local bucket: /download redirects to
Hyperpoint-0.1.1.dmg, which arrives with the release's SHA-256, its type
and length; `latest`, a missing version and POST are refused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://claude-app-downloader-hosting-cf6937-hyperpoint.progremir.workers.dev (commit 9ae6885)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://70c73454-hyperpoint.progremir.workers.dev e395e1c 2026-10-26T16:09:41.247Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8d9c1b37-hyperpoint.progremir.workers.dev 9ae6885 2026-10-26T16:06:21.682Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://e6cc7d80-hyperpoint.progremir.workers.dev 86b6410 2026-10-26T16:01:52.698Z Visit the dashboard ↗

Emir Amanbekov and others added 2 commits October 26, 2026 21:03
Workers Builds publishes a branch with `npx wrangler preview`, and previews
inherit no bindings, so the preview's Worker had no RELEASES and every
/download threw (error 1101). wrangler.jsonc's `previews` block now binds
the same bucket: the Worker only reads it, and a preview should serve the
real releases.

The build logs also show that a push to main runs `npx wrangler deploy`,
not `npx cf deploy`, so production reads wrangler.jsonc as well. The site
README and the file's comment now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
release.yml only built an ad-hoc DMG on a GitHub macOS runner when a pull
request touched the pipeline. Releases are published from the Mac that
holds the certificate and the site deploys through Cloudflare, so this was
the repository's last use of GitHub Actions, on its most expensive runner.
It stopped running anyway: GitHub refuses to start the job while the
account's billing or spending limit is unresolved.

The README's Releasing section now gives the same check to run locally,
`SIGN_IDENTITY=- ALLOW_ADHOC=1 scripts/release.sh 0.2.0-check`, which
built and verified the DMG in 22 seconds. Comments that named CI now say
what the ad-hoc build and the hdiutil retry are for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@progremir
progremir merged commit cd763c8 into main Oct 26, 2026
1 check passed
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.

1 participant