Skip to content

Commit 5e036d0

Browse files
authored
refactor: use GitHub downloads for stable version download (#91)
1 parent 56da422 commit 5e036d0

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

src/install.mjs

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,20 @@ export async function install(version) {
2020
}
2121

2222
const zip = zipName();
23-
const url = version.kind === "canary"
24-
? `https://dl.deno.land/canary/${version.version}/${zip}`
25-
: `https://dl.deno.land/release/v${version.version}/${zip}`;
23+
let url;
24+
25+
switch (version.kind) {
26+
case "canary":
27+
url = `https://dl.deno.land/canary/${version.version}/${zip}`;
28+
break;
29+
case "rc":
30+
url = `https://dl.deno.land/release/v${version.version}/${zip}`;
31+
break;
32+
case "stable":
33+
url =
34+
`https://github.com/denoland/deno/releases/download/v${version.version}/${zip}`;
35+
break;
36+
}
2637

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

0 commit comments

Comments
 (0)