2 Commits

Author SHA1 Message Date
crowlkats
70768ed567 fmt 2024-10-02 05:16:43 +02:00
crowlkats
5f06e8aafb feat: add warning for setup-deno v1 2024-10-02 05:13:56 +02:00
2 changed files with 7 additions and 14 deletions

View File

@@ -17,6 +17,10 @@ function exit(message) {
} }
async function main() { 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 { try {
const denoVersionFile = core.getInput("deno-version-file"); const denoVersionFile = core.getInput("deno-version-file");
const range = parseVersionRange( const range = parseVersionRange(

View File

@@ -20,20 +20,9 @@ export async function install(version) {
} }
const zip = zipName(); const zip = zipName();
let url; const url = version.kind === "canary"
? `https://dl.deno.land/canary/${version.version}/${zip}`
switch (version.kind) { : `https://dl.deno.land/release/v${version.version}/${zip}`;
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}.`); core.info(`Downloading Deno from ${url}.`);