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 14 additions and 7 deletions

View File

@@ -17,10 +17,6 @@ function exit(message) {
}
async function main() {
core.warning(
"Running on setup-deno@1, which is deprecated.\nPlease update to setup-deno@2, which defaults to Deno 2.0",
);
try {
const denoVersionFile = core.getInput("deno-version-file");
const range = parseVersionRange(

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