3 Commits
v1 ... v2.0.1

Author SHA1 Message Date
Leo Kettmeir
1c4873e05d 2.0.1 (#86) 2024-10-09 02:01:02 -07:00
Leo Kettmeir
4b0db74aa8 fix: update README and tests (#85) 2024-10-09 09:54:03 +01:00
Luca Casonato
4606d5cc6f feat: v2 (#82)
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-10-09 01:37:44 -07:00
7 changed files with 21 additions and 35 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -7,7 +7,7 @@ branding:
inputs: inputs:
deno-version: deno-version:
description: 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. description: 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.
default: "1.x" default: "2.x"
deno-version-file: deno-version-file:
description: File containing the Deno version to install such as .dvmrc or .tool-versions. description: File containing the Deno version to install such as .dvmrc or .tool-versions.
deno-binary-name: deno-binary-name:
@@ -16,8 +16,6 @@ inputs:
outputs: outputs:
deno-version: deno-version:
description: "The Deno version that was installed." description: "The Deno version that was installed."
is-canary:
description: "If the installed Deno version was a canary version."
release-channel: release-channel:
description: "The release channel of the installed version." description: "The release channel of the installed version."
runs: runs:

View File

@@ -39,8 +39,6 @@ async function main() {
await install(version); await install(version);
core.setOutput("deno-version", version.version); core.setOutput("deno-version", version.version);
// TODO(@crowlKats): remove in 2.0
core.setOutput("is-canary", version.kind === "canary");
core.setOutput("release-channel", version.kind); core.setOutput("release-channel", version.kind);
core.info("Installation complete."); core.info("Installation complete.");

View File

@@ -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.5.2", "version": "2.0.1",
"author": "Deno Land Inc", "author": "Deno Land Inc",
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",

View File

@@ -20,20 +20,9 @@ export async function install(version) {
} }
const zip = zipName(); const zip = zipName();
let url; const url = version.kind === "canary"
? `https://dl.deno.land/canary/${version.version}/${zip}`
switch (version.kind) { : `https://dl.deno.land/release/v${version.version}/${zip}`;
case "canary":
url = `https://dl.deno.land/canary/${version.version}/${zip}`;
break;
case "rc":
url = `https://dl.deno.land/release/v${version.version}/${zip}`;
break;
case "stable":
url =
`https://github.com/denoland/deno/releases/download/v${version.version}/${zip}`;
break;
}
core.info(`Downloading Deno from ${url}.`); core.info(`Downloading Deno from ${url}.`);

View File

@@ -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") {