Skip to content

Commit

Permalink
refactor: use GitHub downloads for stable version download (#91)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5e036d0)
  • Loading branch information
crowlKats committed Jan 9, 2025
1 parent 7c6ecb3 commit 003ac26
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/install.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,20 @@ export async function install(version) {
}

const zip = zipName();
const url = version.kind === "canary"
? `https://dl.deno.land/canary/${version.version}/${zip}`
: `https://dl.deno.land/release/v${version.version}/${zip}`;
let url;

switch (version.kind) {
case "canary":
url = `https://dl.deno.land/canary/${version.version}/${zip}`;
break;
case "rc":
url = `https://dl.deno.land/release/v${version.version}/${zip}`;
break;
case "stable":
url =
`https://github.com/denoland/deno/releases/download/v${version.version}/${zip}`;
break;
}

core.info(`Downloading Deno from ${url}.`);

Expand Down

0 comments on commit 003ac26

Please sign in to comment.