The version to look up, with or without a leading v.
The release, or undefined if it couldn't be retrieved.
const release = await getReleaseByTag("1.3.0");
release?.html_url; // "https://github.com/owner/repo/releases/tag/v1.3.0"
export async function getReleaseByTag(version: string): Promise<GithubRelease | undefined> {
const tag = `v${normalizeVersion(version)}`;
return fetchRelease(`releases/tags/${encodeURIComponent(tag)}`);
}
Fetches a specific release by tag. Used on the Web Store path, where
chrome.runtime.onUpdateAvailablereports only a version number and the release notes have to be looked up separately.