diff --git a/deno-problem-matchers.json b/deno-problem-matchers.json new file mode 100644 index 00000000..49d4a789 --- /dev/null +++ b/deno-problem-matchers.json @@ -0,0 +1,21 @@ +{ + "problemMatcher": [ + { + "owner": "deno-lint", + "pattern": [ + { + "regexp": "^(?:\\x1B\\[[0-9;]*[a-zA-Z])*(warning|warn|error)(?:\\[(\\S*)\\])?(?:\\x1B\\[[0-9;]*[a-zA-Z])*: (.*?)(?:\\x1B\\[[0-9;]*[a-zA-Z])*$", + "severity": 1, + "code": 2, + "message": 3 + }, + { + "regexp": "^ (?:\\x1B\\[[0-9;]*[a-zA-Z])*-->(?:\\x1B\\[[0-9;]*[a-zA-Z])* (?:\\x1B\\[[0-9;]*[a-zA-Z])*(\\S+?)(?:\\x1B\\[[0-9;]*[a-zA-Z])*:(\\d+):(\\d+)(?:\\x1B\\[[0-9;]*[a-zA-Z])*$", + "file": 1, + "line": 2, + "column": 3 + } + ] + } + ] +} diff --git a/main.mjs b/main.mjs index 9e59fd89..6ca43a9f 100644 --- a/main.mjs +++ b/main.mjs @@ -1,5 +1,6 @@ import process from "node:process"; import core from "@actions/core"; +import path from "node:path"; import { getDenoVersionFromFile, parseVersionRange, @@ -38,6 +39,12 @@ async function main() { await install(version); + core.info( + `::add-matcher::${ + path.join(import.meta.dirname ?? ".", "deno-problem-matchers.json") + }`, + ); + core.setOutput("deno-version", version.version); core.setOutput("release-channel", version.kind);