Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play

GitHub Action

Setup Wasmtime

v2.0.0-rc.2

Setup Wasmtime

play

Setup Wasmtime

👩‍💻 Wasmtime WebAssembly runtime installer for GitHub Actions

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Setup Wasmtime

uses: jcbhmr/setup-wasmtime@v2.0.0-rc.2

Learn more about this action in jcbhmr/setup-wasmtime

Choose a version

bytecodelliance/actions

With the bytecodealliance/actions collection, you can easily setup wasmtime and wasm-tools in your GitHub Action.

This collection of Actions enables the following use cases:

Let's take a look at each one to learn about the required inputs and walk through an example.

Install wasmtime

Inputs

Name Required Default Description
version False latest The version of wasmtime to install.
github_token False - The GitHub token for querying/downloading wasmtime releases. If provided, it avoids GitHub API rate limiting during GitHub action executions

Examples

Setting up the latest version of wasmtime

name: wasmtime setup

on:
  push:
    branches: [main]

jobs:
  setup:
    runs-on: ubuntu-latest
    name: Setup wasmtime
    steps:
      - name: Setup `wasmtime`
        uses: bytecodealliance/actions/wasmtime/setup@v1

      - name: Run `wasmtime version`
        run: "wasmtime --version"

Setting up a specific version of wasmtime

name: wasmtime

on:
  push:
    branches: [main]

jobs:
  setup:
    runs-on: ubuntu-latest
    name: Setup wasmtime
    steps:
      - name: Setup `wasmtime`
        uses: bytecodealliance/actions/wasmtime/setup@v1
        with:
          version: "v13.0.0"

      - name: Run `wasmtime version`
        run: "wasmtime --version"

Install wasm-tools

Inputs

Name Required Default Description
version False latest The version of wasm-tools to install.
github_token False - The GitHub token for querying/downloading wasm-tools releases. If provided, it avoids GitHub API rate limiting during GitHub action executions

Examples

Setting up the latest version of wasm-tools

name: wasm-tools setup

on:
  push:
    branches: [main]

jobs:
  setup:
    runs-on: ubuntu-latest
    name: Setup wasm-tools
    steps:
      - name: Setup `wasm-tools`
        uses: bytecodealliance/actions/wasm-tools/setup@v1

      - name: Run `wasm-tools version`
        run: "wasm-tools --version"

Setting up a specific version of wasm-tools

name: wasm-tools

on:
  push:
    branches: [main]

jobs:
  setup:
    runs-on: ubuntu-latest
    name: Setup wasm-tools
    steps:
      - name: Setup `wasm-tools`
        uses: bytecodealliance/actions/wasm-tools/setup@v1
        with:
          version: "1.0.43"

      - name: Run `wasm-tools version`
        run: "wasm-tools --version"