mirror of
https://gitea.com/actions/setup-deno.git
synced 2025-12-12 11:27:10 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11b63cf76c | ||
|
|
553a648212 |
@@ -7,7 +7,7 @@ branding:
|
|||||||
inputs:
|
inputs:
|
||||||
deno-version:
|
deno-version:
|
||||||
description: The Deno version to install. Can be a semver version of a stable release, "canary" for the latest canary, or the Git hash of a specific canary release.
|
description: The Deno version to install. Can be a semver version of a stable release, "canary" for the latest canary, or the Git hash of a specific canary release.
|
||||||
default: "2.x"
|
default: "1.x"
|
||||||
deno-version-file:
|
deno-version-file:
|
||||||
description: File containing the Deno version to install such as .dvmrc or .tool-versions.
|
description: File containing the Deno version to install such as .dvmrc or .tool-versions.
|
||||||
deno-binary-name:
|
deno-binary-name:
|
||||||
@@ -16,6 +16,8 @@ inputs:
|
|||||||
outputs:
|
outputs:
|
||||||
deno-version:
|
deno-version:
|
||||||
description: "The Deno version that was installed."
|
description: "The Deno version that was installed."
|
||||||
|
is-canary:
|
||||||
|
description: "If the installed Deno version was a canary version."
|
||||||
release-channel:
|
release-channel:
|
||||||
description: "The release channel of the installed version."
|
description: "The release channel of the installed version."
|
||||||
runs:
|
runs:
|
||||||
|
|||||||
2
main.mjs
2
main.mjs
@@ -39,6 +39,8 @@ async function main() {
|
|||||||
await install(version);
|
await install(version);
|
||||||
|
|
||||||
core.setOutput("deno-version", version.version);
|
core.setOutput("deno-version", version.version);
|
||||||
|
// TODO(@crowlKats): remove in 2.0
|
||||||
|
core.setOutput("is-canary", version.kind === "canary");
|
||||||
core.setOutput("release-channel", version.kind);
|
core.setOutput("release-channel", version.kind);
|
||||||
|
|
||||||
core.info("Installation complete.");
|
core.info("Installation complete.");
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-deno",
|
"name": "setup-deno",
|
||||||
"description": "Set up Deno easially in GitHub Actions",
|
"description": "Set up Deno easially in GitHub Actions",
|
||||||
"version": "2.0.0",
|
"version": "1.5.2",
|
||||||
"author": "Deno Land Inc",
|
"author": "Deno Land Inc",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -20,9 +20,20 @@ export async function install(version) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const zip = zipName();
|
const zip = zipName();
|
||||||
const url = version.kind === "canary"
|
let url;
|
||||||
? `https://dl.deno.land/canary/${version.version}/${zip}`
|
|
||||||
: `https://dl.deno.land/release/v${version.version}/${zip}`;
|
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}.`);
|
core.info(`Downloading Deno from ${url}.`);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user