Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update README and tests #85

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- macos-latest
deno:
- "1.x"
- "2.x"
- "1.33.1"
- "canary"
- "~1.32"
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,65 @@ Set up your GitHub Actions workflow with a specific version of Deno.
### Latest stable for a major

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x
```

### Latest stable for any major

Targets the latest major, minor and patch version of Deno.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
```

### Specific stable

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: "1.8.2"
```

### Semver range

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: "~1.7"
```

### Latest canary

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: canary
```

### Specific canary

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: e7b7129b7a92b7500ded88f8f5baa25a7f59e56e
```

### Latest release candidate

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: rc
```

### Specific release candidate

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: 2.0.0-rc.1
```
Expand All @@ -76,7 +76,7 @@ The extension can also automatically read the version file from
[`.tool-versions`](https://asdf-vm.com/manage/configuration.html#tool-versions)

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version-file: .tool-versions
```
Expand All @@ -85,7 +85,7 @@ The extension can also automatically read the file from
[`dvm`](https://github.com/justjavac/dvm).

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version-file: .dvmrc
```
Expand All @@ -95,7 +95,7 @@ The extension can also automatically read the file from
This is useful when you want to install different versions of Deno side by side.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: canary
deno-binary-name: deno_canary
Expand All @@ -108,7 +108,7 @@ You can determine the release channel reading back the `release-channel` output.
Valid values are `stable`, `canary` and `rc`.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
Expand All @@ -126,7 +126,7 @@ For stable and rc versions, the output will be the regular semver version
number.

```yaml
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
Expand Down
2 changes: 1 addition & 1 deletion src/version.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/;
* @returns {VersionRange | null}
*/
export function parseVersionRange(version) {
version = String(version) || "1.x";
version = String(version) || "2.x";
version = version.trim();

if (version === "canary") {
Expand Down
Loading