mirror of
https://gitea.com/actions/setup-deno.git
synced 2025-12-11 10:56:49 +00:00
fix: update README and tests (#85)
This commit is contained in:
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -17,6 +17,7 @@ jobs:
|
|||||||
- macos-latest
|
- macos-latest
|
||||||
deno:
|
deno:
|
||||||
- "1.x"
|
- "1.x"
|
||||||
|
- "2.x"
|
||||||
- "1.33.1"
|
- "1.33.1"
|
||||||
- "canary"
|
- "canary"
|
||||||
- "~1.32"
|
- "~1.32"
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -7,9 +7,9 @@ Set up your GitHub Actions workflow with a specific version of Deno.
|
|||||||
### Latest stable for a major
|
### Latest stable for a major
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: v1.x
|
deno-version: v2.x
|
||||||
```
|
```
|
||||||
|
|
||||||
### Latest stable for any major
|
### Latest stable for any major
|
||||||
@@ -17,7 +17,7 @@ Set up your GitHub Actions workflow with a specific version of Deno.
|
|||||||
Targets the latest major, minor and patch version of Deno.
|
Targets the latest major, minor and patch version of Deno.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: vx.x.x
|
deno-version: vx.x.x
|
||||||
```
|
```
|
||||||
@@ -25,7 +25,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Specific stable
|
### Specific stable
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: "1.8.2"
|
deno-version: "1.8.2"
|
||||||
```
|
```
|
||||||
@@ -33,7 +33,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Semver range
|
### Semver range
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: "~1.7"
|
deno-version: "~1.7"
|
||||||
```
|
```
|
||||||
@@ -41,7 +41,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Latest canary
|
### Latest canary
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: canary
|
deno-version: canary
|
||||||
```
|
```
|
||||||
@@ -49,7 +49,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Specific canary
|
### Specific canary
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: e7b7129b7a92b7500ded88f8f5baa25a7f59e56e
|
deno-version: e7b7129b7a92b7500ded88f8f5baa25a7f59e56e
|
||||||
```
|
```
|
||||||
@@ -57,7 +57,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Latest release candidate
|
### Latest release candidate
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: rc
|
deno-version: rc
|
||||||
```
|
```
|
||||||
@@ -65,7 +65,7 @@ Targets the latest major, minor and patch version of Deno.
|
|||||||
### Specific release candidate
|
### Specific release candidate
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: 2.0.0-rc.1
|
deno-version: 2.0.0-rc.1
|
||||||
```
|
```
|
||||||
@@ -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)
|
[`.tool-versions`](https://asdf-vm.com/manage/configuration.html#tool-versions)
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version-file: .tool-versions
|
deno-version-file: .tool-versions
|
||||||
```
|
```
|
||||||
@@ -85,7 +85,7 @@ The extension can also automatically read the file from
|
|||||||
[`dvm`](https://github.com/justjavac/dvm).
|
[`dvm`](https://github.com/justjavac/dvm).
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version-file: .dvmrc
|
deno-version-file: .dvmrc
|
||||||
```
|
```
|
||||||
@@ -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.
|
This is useful when you want to install different versions of Deno side by side.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
with:
|
with:
|
||||||
deno-version: canary
|
deno-version: canary
|
||||||
deno-binary-name: deno_canary
|
deno-binary-name: deno_canary
|
||||||
@@ -108,7 +108,7 @@ You can determine the release channel reading back the `release-channel` output.
|
|||||||
Valid values are `stable`, `canary` and `rc`.
|
Valid values are `stable`, `canary` and `rc`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
id: deno
|
id: deno
|
||||||
with:
|
with:
|
||||||
deno-version: canary
|
deno-version: canary
|
||||||
@@ -126,7 +126,7 @@ For stable and rc versions, the output will be the regular semver version
|
|||||||
number.
|
number.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: denoland/setup-deno@v1
|
- uses: denoland/setup-deno@v2
|
||||||
id: deno
|
id: deno
|
||||||
with:
|
with:
|
||||||
deno-version: canary
|
deno-version: canary
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const GIT_HASH_RE = /^[0-9a-fA-F]{40}$/;
|
|||||||
* @returns {VersionRange | null}
|
* @returns {VersionRange | null}
|
||||||
*/
|
*/
|
||||||
export function parseVersionRange(version) {
|
export function parseVersionRange(version) {
|
||||||
version = String(version) || "1.x";
|
version = String(version) || "2.x";
|
||||||
version = version.trim();
|
version = version.trim();
|
||||||
|
|
||||||
if (version === "canary") {
|
if (version === "canary") {
|
||||||
|
|||||||
Reference in New Issue
Block a user