Skip to content

Commit 003ac26

Browse files
committed
refactor: use GitHub downloads for stable version download (#91)
(cherry picked from commit 5e036d0)
1 parent 7c6ecb3 commit 003ac26

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

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)