Skip to content

feat: fall back to the GitHub release when npm cannot install the CLI - #457

Merged
Coly010 merged 1 commit into
mainfrom
columferry/setup-cli-github-release-fallback
Oct 30, 2026
Merged

Coly010 merged 1 commit into
mainfrom
columferry/setup-cli-github-release-fallback

Conversation

@Coly010

@Coly010 Coly010 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

v3 installs the CLI from npm only, so anything that stops npm producing a working binary fails the action outright. The case that prompted this was the 3.0.0-beta.16 release: the supabase package became installable a few minutes before its platform binaries did, npm skipped the missing optional dependency, and supabase --version failed with No matching Supabase CLI binary package found on macOS and Windows. A registry outage for a pinned version fails the same way.

Now, when npm can't resolve, install or run a fixed version, the action logs a warning and installs that same version from its GitHub release instead:

  • The version comes from the input, the lockfile, or what npm view resolved. A dist-tag that npm couldn't resolve still fails, since there's no reliable mapping from beta/next/v2.stable to a release.
  • The archive is checked against the release's checksums before extracting. Releases from 2.99.0 on use checksums.txt and versioned archive names; older ones use supabase_<version>_checksums.txt and unversioned names, and both are handled.
  • On musl runners it uses the release's .apk, which carries the musl build, because the Linux tarball is glibc for v3.
  • Windows extracts with the system tar.exe, since Git Bash's GNU tar reads C:\... as a remote host.
  • A lockfile integrity mismatch or an npm package with no supabase bin still fails without falling back.

There's a new install-source output (npm or github-release), so a caller that specifically wants to test the npm package can flag a fallback. A new CI job forces the fallback on all three hosted runners, for both release naming schemes.

The lockfile integrity check only covers the npm path. A fallback install is verified against the release's own checksums, not the lockfile.

🤖 Generated with Claude Code

When npm fails to resolve, install or run a fixed CLI version, download
the same version's GitHub release archive, verify it against the
release checksums, and report the source through a new install-source
output. Lockfile integrity mismatches still fail without falling back.
@Coly010
Coly010 requested a review from a team as a code owner October 30, 2026 13:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T13:35:32.981357Z 35a24f1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Coly010
Coly010 merged commit d239d10 into main Oct 30, 2026
31 checks passed
@Coly010
Coly010 deleted the columferry/setup-cli-github-release-fallback branch October 30, 2026 14:54
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