-
Notifications
You must be signed in to change notification settings - Fork 4
Home
This is a no-dependency micro helper for developers of binary addons for Node. It is literally two small one-file utilities integrated with GitHub releases. The project solves two problems:
- save-to-github-cache saves a binary artifact to a Github release according to the platform, architecture, and Node ABI (or N-API level). Designed to be used with GitHub actions.
- install-from-cache retrieves a previously saved artifact, tests if it works properly, and rebuilds a project from sources in the case of failure.
In general, it can save your users from a long recompilation and, in some cases, even save them from installing build tools. By using GitHub facilities (Releases and Actions) the whole process of publishing and subsequent installations are secure, transparent, painless, inexpensive, or even free for public repositories.
Starting with npm 12 (July 2026), npm does not run dependency lifecycle scripts by default β and this helper runs as the consuming addon's install script. End users have to approve the addon once (npm approve-scripts <addon>); otherwise neither the prebuilt download nor the node-gyp fallback runs. See NPM 12 and install scripts for the full story.
π Search the wiki β full-text search over every page (titles and body text).
The link opens GitHub's search with the box already filled in as
repo:uhop/install-artifact-from-githuband the Wikis tab selected. Type your terms after the existing text β e.g.repo:uhop/install-artifact-from-github DOWNLOAD_HOST. Keep therepo:uhop/install-artifact-from-githubpart β it scopes the search to this wiki; deleting it searches all of GitHub instead. Search is case-insensitive; wrap multi-word phrases in quotes.
Reference
- Install from cache β the consumer-side utility: flags, environment variables, the asset URL format, npm parameters.
- Save to GitHub cache β the CI-side utility: flags, compression formats, a GitHub Actions workflow example.
Guides
- Using N-API β ship one binary per platform/arch instead of one per Node major.
- Using a proxy β route downloads through corporate HTTP/HTTPS/SOCKS proxies.
- Making a local mirror β serve artifacts from an internal host or the local filesystem.
- Build artifacts locally β save artifacts manually for exotic configurations.
- NPM 12 and install scripts β the consumer-side approval flow required by npm 12.
Project
- Release notes β the full release history with dates.
- Why??? β the motivation for this project.
We support all currently active Node versions. As of writing (June 2026) these are 22, 24 (LTS) and 26 (current). The package declares engines.node": ">=18" since 1.5.0; older Node will refuse to install (or emit an EBADENGINE warning).