GitHub Action
Setup Wasmtime
π©βπ» Wasmtime WebAssembly runtime installer for GitHub Actions
- uses: jcbhmr/setup-wasmtime@v2
- run: cargo build --target wasm32-wasi
- run: wasmtime target/wasm32-wasi/debug/*.wasm |
πͺ Installs Wasmtime globally
π’ Supports semver ranges
π Caches the Wasmtime installation
π Here's what you're after:
on: push
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jcbhmr/setup-wasmtime@v2
- run: cargo build --target wasm32-wasi
- run: wasmtime target/wasm32-wasi/debug/*.wasm
-
wasmtime-version
: Which version of Wasmtime to install. This can be an exact version specifier such as16.0.0
or a semver range like~16.0.0
or16.x
. Uselatest
to always install the latest release. Defaults tolatest
. -
wasmtime-token
: The GitHub token to use when fetching the version list from bytecodealliance/wasmtime. You shouldn't have to touch this. The default is thegithub.token
if you're on github.com or unauthenticated (rate limited) if you're not on github.com.
-
wasmtime-version
: The version of Wasmtime that was installed. This will be something like16.0.0
or similar. -
cache-hit
: Whether or not Wasmtime was restored from the runner's cache or download anew.
How do I test my changes?
Open a Draft Pull Request and some magic GitHub Actions will run to test the action.