mirror of
https://gitea.com/actions/setup-deno.git
synced 2025-12-12 11:27:10 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
004814556e | ||
|
|
a63bb6b1ba | ||
|
|
eb33d5551a |
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -26,6 +26,11 @@ jobs:
|
|||||||
- name: Test Deno
|
- name: Test Deno
|
||||||
run: deno run https://deno.land/std/examples/welcome.ts
|
run: deno run https://deno.land/std/examples/welcome.ts
|
||||||
|
|
||||||
|
- name: Test `deno install`
|
||||||
|
run: |
|
||||||
|
deno install --allow-net -n deno_curl https://deno.land/std/examples/curl.ts
|
||||||
|
deno_curl https://deno.land/std/examples/curl.ts
|
||||||
|
|
||||||
- name: Format
|
- name: Format
|
||||||
if: runner.os == 'Linux' && matrix.deno == 'canary'
|
if: runner.os == 'Linux' && matrix.deno == 'canary'
|
||||||
run: npm run fmt:check
|
run: npm run fmt:check
|
||||||
|
|||||||
@@ -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": "1.0.0",
|
"version": "1.1.0",
|
||||||
"author": "Deno Land Inc",
|
"author": "Deno Land Inc",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
const os = require("os");
|
||||||
|
const path = require("path");
|
||||||
const process = require("process");
|
const process = require("process");
|
||||||
const core = require("@actions/core");
|
const core = require("@actions/core");
|
||||||
const tc = require("@actions/tool-cache");
|
const tc = require("@actions/tool-cache");
|
||||||
@@ -19,7 +21,7 @@ async function install(version) {
|
|||||||
const zip = zipName();
|
const zip = zipName();
|
||||||
const url = version.isCanary
|
const url = version.isCanary
|
||||||
? `https://dl.deno.land/canary/${version.version}/${zip}`
|
? `https://dl.deno.land/canary/${version.version}/${zip}`
|
||||||
: `https://dl.deno.land/release/v${version.version}/${zip}`;
|
: `https://github.com/denoland/deno/releases/download/v${version.version}/${zip}`;
|
||||||
|
|
||||||
core.info(`Downloading Deno from ${url}.`);
|
core.info(`Downloading Deno from ${url}.`);
|
||||||
|
|
||||||
@@ -33,6 +35,9 @@ async function install(version) {
|
|||||||
);
|
);
|
||||||
core.info(`Cached Deno to ${newCachedPath}.`);
|
core.info(`Cached Deno to ${newCachedPath}.`);
|
||||||
core.addPath(newCachedPath);
|
core.addPath(newCachedPath);
|
||||||
|
const denoInstallRoot = process.env.DENO_INSTALL_ROOT ||
|
||||||
|
path.join(os.homedir(), ".deno", "bin");
|
||||||
|
core.addPath(denoInstallRoot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @returns {string} */
|
/** @returns {string} */
|
||||||
|
|||||||
Reference in New Issue
Block a user