Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.

Commit 0762d58

Browse files
committed
docs: clarify options
1 parent 0c63b8d commit 0762d58

File tree

3 files changed

+28
-8
lines changed

3 files changed

+28
-8
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test the action
1+
name: Test
22

33
on:
44
push: { branches: [main] }
@@ -12,7 +12,7 @@ jobs:
1212
matrix:
1313
os: [ubuntu-latest, macos-latest, windows-latest]
1414

15-
name: Test basic usage on ${{ matrix.os }}
15+
name: Basic on ${{ matrix.os }}
1616
runs-on: ${{ matrix.os }}
1717

1818
steps:
@@ -31,7 +31,7 @@ jobs:
3131
matrix:
3232
os: [ubuntu-latest, macos-latest, windows-latest]
3333

34-
name: Test customized usage on ${{ matrix.os }}
34+
name: Customized on ${{ matrix.os }}
3535
runs-on: ${{ matrix.os }}
3636

3737
steps:
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
deno-version: 1.x
4545
deno-lock-path: "test/customized/deno.lock"
46-
scripts-dir: "test/customized/"
46+
directory: "test/customized"
4747

4848
- name: Test customized usage
4949
run: deno run -A --config=./test/customized/deno.json ./test/customized/main.ts

README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,37 @@
77
Based on `denoland/setup-deno@v1`, & `actions/cache@v3`, handles `DENO_DIR` and caching for you.\
88
Works on Ubuntu, macOS & Windows runners.
99

10+
### Usage
11+
12+
#### Basic:
13+
14+
```yaml
15+
- uses: nekowinston/setup-deno@v1
16+
```
17+
18+
#### All options:
19+
20+
```yaml
21+
- uses: nekowinston/setup-deno@v1
22+
with:
23+
deno-version: "~1.38"
24+
deno-json-path: ./subdirectory/deno.json
25+
deno-lock-path: ./subdirectory/deno.lock
26+
directory: ./subdirectory
27+
```
28+
1029
### Inputs
1130
- `deno-version`:\
12-
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.
31+
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.\
32+
See [`setup-deno`](https://github.com/marketplace/actions/setup-deno) for examples.\
1333
Defaults to `1.x`.
1434
- `deno-json-path`:\
1535
The path to the Deno config file to use for caching.\
1636
Defaults to an empty string, using the built-in CLI default.
1737
- `deno-lock-path`:\
1838
The path to the lock file to use for caching.\
1939
Defaults to `./deno.lock`.
20-
- `scripts-dir`:\
40+
- `directory`:\
2141
The path to the scripts to cache. This can be useful if Deno is only part of your repo, and stored in a subdirectory.\
2242
Defaults to the repo root.
2343

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
deno-lock-path:
1515
description: "The path to the lock file to use for caching. Defaults to `./deno.lock`."
1616
default: "./deno.lock"
17-
scripts-dir:
17+
directory:
1818
description: "The path to the scripts to cache. Defaults to the repo root."
1919
default: "."
2020

@@ -53,6 +53,6 @@ runs:
5353
shell: bash
5454
run: |
5555
find ${{ runner.os == 'macOS' && '-E' || '' }} \
56-
${{ inputs.scripts-dir }} \
56+
${{ inputs.directory }} \
5757
-regex '.+\.[tj]sx?$' \
5858
-exec deno cache {} ${{ inputs.deno-json-path != '' && '--config=' || '' }}${{ inputs.deno-json-path }} \;

0 commit comments

Comments
 (0)