
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
electron-releases-provider-github
Advanced tools
GitHub provider for Electron releases - fetch releases and assets from GitHub
GitHub provider for Electron auto-update servers. Fetches releases and assets directly from GitHub Releases.
npm install electron-releases-provider-github
# or
yarn add electron-releases-provider-github
# or
bun add electron-releases-provider-github
import { configureGithubProvider } from "electron-releases-provider-github";
const githubProvider = configureGithubProvider({
token: process.env.GITHUB_TOKEN!,
owner: "your-org",
repo: "your-app",
});
// Use with an adapter
import { configureNextjsAdapter } from "electron-releases-adapter-nextjs";
export const GET = configureNextjsAdapter({
releases: githubProvider.releases,
assets: githubProvider.assets,
});
configureGithubProvider({
// Required: GitHub personal access token
token: process.env.GITHUB_TOKEN!,
// Required: Repository owner (user or organization)
owner: "your-org",
// Required: Repository name
repo: "your-app",
// Optional: Release channels (default: ["alpha", "beta", "stable"])
channels: ["alpha", "beta", "stable"],
});
Create a Personal Access Token at github.com/settings/tokens:
| Repository Type | Required Scope |
|---|---|
| Public | public_repo |
| Private | repo (full) |
GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The provider automatically categorizes releases by channel based on:
-alpha, -beta, etc.| Version Tag | Prerelease | Channel |
|---|---|---|
1.0.0 | No | stable |
1.0.0-beta.1 | Yes | beta |
1.0.0-alpha.3 | Yes | alpha |
Important: The last channel in your array is the "stable" channel (non-prerelease releases).
configureGithubProvider({
// ...
channels: ["nightly", "beta", "stable"], // "stable" = default channel
});
You can use the releases and assets providers independently:
import {
configureGithubReleases,
configureGithubAssets
} from "electron-releases-provider-github";
// Just releases
const releases = configureGithubReleases({
token: process.env.GITHUB_TOKEN!,
owner: "your-org",
repo: "your-app",
});
// Get latest stable release
const latest = await releases.getRelease();
// Get latest beta
const beta = await releases.getRelease({ channel: "beta" });
// Get specific version
const specific = await releases.getRelease({ version: "1.2.3" });
// Get all channel releases
const all = await releases.getReleases();
// { stable: ReleaseInfo, beta: ReleaseInfo, alpha: ReleaseInfo }
// Just assets
const assets = configureGithubAssets({
token: process.env.GITHUB_TOKEN!,
owner: "your-org",
repo: "your-app",
});
// Get signed download URL
const downloadUrl = await assets.getSignedDownloadUrl(platformAsset);
The provider automatically detects platforms from asset filenames:
| Platform | File Patterns |
|---|---|
darwin | *mac*.zip, *darwin*.zip |
darwin_arm64 | *mac*arm64*.zip, *darwin*arm64*.zip |
dmg | *.dmg |
dmg_arm64 | *arm64*.dmg |
exe | *.exe |
exe_arm64 | *arm64*.exe |
deb | *.deb |
rpm | *.rpm |
AppImage | *.AppImage |
For a release tagged v1.2.3, your assets might look like:
MyApp-1.2.3-mac.zip → darwin
MyApp-1.2.3-mac-arm64.zip → darwin_arm64
MyApp-1.2.3.dmg → dmg
MyApp-1.2.3-arm64.dmg → dmg_arm64
MyApp-1.2.3.exe → exe
MyApp-1.2.3.deb → deb
MyApp-1.2.3.rpm → rpm
MyApp-1.2.3.AppImage → AppImage
RELEASES → Windows Squirrel file
For Squirrel.Windows updates, include a RELEASES file in your GitHub release assets. The provider automatically:
.nupkg paths to absolute URLsFor private repos, the provider generates authenticated download URLs using your GitHub token. These are time-limited signed URLs that work for direct downloads.
const assets = configureGithubAssets({
token: process.env.GITHUB_TOKEN!, // Needs 'repo' scope
// ...
});
// Returns a signed URL that works without authentication
const signedUrl = await assets.getSignedDownloadUrl(asset);
configureGithubProvider(config)Returns both releases and assets providers:
const { releases, assets } = configureGithubProvider(config);
configureGithubReleases(config)Returns a ReleasesProvider:
interface ReleasesProvider {
getRelease(options?: {
channel?: string;
version?: string | "latest";
}): Promise<ReleaseInfo | null>;
getReleases(options?: {
channels?: string[];
}): Promise<Record<string, ReleaseInfo | null>>;
getChannelFromVersion(version: string): string;
}
configureGithubAssets(config)Returns an AssetsProvider:
interface AssetsProvider {
getSignedDownloadUrl(asset: PlatformAsset): Promise<string | null>;
}
ReleaseInfointerface ReleaseInfo {
version: string; // "1.2.3"
notes: string; // Release body/changelog
pub_date: string; // ISO date
channel: string; // "stable", "beta", etc.
platforms: Record<string, PlatformAsset>;
files: Record<string, string>; // e.g., { RELEASES: "..." }
}
PlatformAssetinterface PlatformAsset {
name: string; // "MyApp-1.2.3-mac.zip"
api_url: string; // GitHub API URL
url: string; // Browser download URL
content_type: string; // "application/zip"
size: number; // Size in MB
}
When publishing releases on GitHub:
1.0.0, 1.0.0-beta.1)If using electron-builder, configure it to publish to GitHub:
{
"build": {
"publish": {
"provider": "github",
"owner": "your-org",
"repo": "your-app"
}
}
}
Then publish with:
# Stable release
electron-builder --publish always
# Beta release
electron-builder --publish always -c.publish.releaseType=prerelease
Full TypeScript support with exported types:
import type {
GithubConfig,
ReleaseInfo,
PlatformAsset,
ReleasesProvider,
AssetsProvider,
} from "electron-releases-provider-github";
The provider uses the GitHub REST API via Octokit. Be aware of GitHub's rate limits:
| Authentication | Limit |
|---|---|
| With token | 5,000 requests/hour |
| Without token | 60 requests/hour |
For high-traffic apps, consider caching responses.
electron-releases-core - Core types and routingelectron-releases-adapter-nextjs - Next.js adapterMIT
FAQs
GitHub provider for Electron releases - fetch releases and assets from GitHub
We found that electron-releases-provider-github demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.