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
3 changed files with 10 additions and 2 deletions

View File

@@ -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:

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(
@@ -39,6 +43,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.");

View File

@@ -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",