👩💻 wasm-tools installer for GitHub Actions
- uses: jcbhmr/setup-wasm-tools@v2
- run: cargo build --target wasm32-wasi
- run: wasm-tools print target/wasm32-wasi/debug/*.wasm |
🟪 Installs wasm-tools globally
🔢 Supports semver ranges
📁 Caches the wasm-tools installation
🚀 Here's what you're after:
on: push
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jcbhmr/setup-wasm-tools@v2
- run: cargo build --target wasm32-wasi
- run: wasm-tools print target/wasm32-wasi/debug/*.wasm
-
wasm-tools-version
: Which version of wasm-tools to install. This can be an exact version specifier such as1.0.0
or a semver range like~1.0.0
or1.x
. Uselatest
to always install the latest release. Defaults tolatest
. -
wasm-tools-token
: The GitHub token to use when fetching the version list from bytecodealliance/wasm-tools. 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.
-
wasm-tools-version
: The version of wasm-tools that was installed. This will be something like1.0.0
or similar. -
cache-hit
: Whether or not wasm-tools 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.