2 Commits

Author SHA1 Message Date
crowlkats
11b63cf76c 1.5.2 2025-01-09 22:17:00 +01:00
Leo Kettmeir
553a648212 refactor: use GitHub downloads for stable version download (#91)
(cherry picked from commit 5e036d05d8)
2025-01-09 22:09:52 +01:00
2 changed files with 15 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "setup-deno",
"description": "Set up Deno easially in GitHub Actions",
"version": "1.5.1",
"version": "1.5.2",
"author": "Deno Land Inc",
"license": "MIT",
"type": "module",

View File

@@ -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}.`);