Set up your GitHub Actions workflow with a specific version of Deno.
- uses: denoland/setup-deno@v2
with:
deno-version: v2.xTargets the latest major, minor and patch version of Deno.
- uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x- uses: denoland/setup-deno@v2
with:
deno-version: "1.8.2"- uses: denoland/setup-deno@v2
with:
deno-version: "~1.7"- uses: denoland/setup-deno@v2
with:
deno-version: canary- uses: denoland/setup-deno@v2
with:
deno-version: e7b7129b7a92b7500ded88f8f5baa25a7f59e56e- uses: denoland/setup-deno@v2
with:
deno-version: rc- uses: denoland/setup-deno@v2
with:
deno-version: 2.0.0-rc.1- uses: denoland/setup-deno@v2
with:
deno-version: ltsThe extension can also automatically read the version file from
.tool-versions
- uses: denoland/setup-deno@v2
with:
deno-version-file: .tool-versionsThe extension can also automatically read the file from
dvm.
- uses: denoland/setup-deno@v2
with:
deno-version-file: .dvmrcThis is useful when you want to install different versions of Deno side by side.
- uses: denoland/setup-deno@v2
with:
deno-version: canary
deno-binary-name: deno_canaryYou can determine the release channel reading back the release-channel output.
Valid values are stable, canary and rc.
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
- run: echo "Deno release channel is ${{ steps.deno.outputs.release-channel }}"You can determine the installed version reading back the deno-version output.
For canary versions, the output will be in the form 0.0.0-GIT_HASH.
For stable and rc versions, the output will be the regular semver version number.
- uses: denoland/setup-deno@v2
id: deno
with:
deno-version: canary
- run: echo "Deno version is ${{ steps.deno.outputs.deno-version }}"Dependencies installed by Deno can be cached automatically between workflow runs. This helps make your GH action run faster by not repeating caching work and network requests done by a previous run.
To enable the cache, use cache: true.
- uses: denoland/setup-deno@v2
with:
cache: trueWarning
If an environment variable DENO_DIR is set for steps that run/download
dependencies, then DENO_DIR must also be set for the denoland/setup-deno
action, for the caching to work as intended.
By default, the cache is automatically keyed by:
- the github job_id
- the runner os and architecture
- a hash of the
deno.lockfiles in the project
It is possible to customize the default hash
(${{ hashFiles('**/deno.lock') }}) used as part of the cache key via the
cache-hash input.
- uses: denoland/setup-deno@v2
with:
# setting `cache-hash` implies `cache: true` and will replace
# the default cache-hash of `${{ hashFiles('**/deno.lock') }}`
cache-hash: ${{ hashFiles('**/deno.json') }}