Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcbhmr/setup-wasm-tools
👩💻 wasm-tools installer for GitHub Actions
https://github.com/jcbhmr/setup-wasm-tools
actions github-action github-actions installer wasm-tools webassembly
Last synced: 20 days ago
JSON representation
👩💻 wasm-tools installer for GitHub Actions
- Host: GitHub
- URL: https://github.com/jcbhmr/setup-wasm-tools
- Owner: jcbhmr
- Created: 2024-01-24T02:17:29.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-05-18T20:51:49.000Z (6 months ago)
- Last Synced: 2024-05-18T21:38:08.746Z (6 months ago)
- Topics: actions, github-action, github-actions, installer, wasm-tools, webassembly
- Language: JavaScript
- Homepage:
- Size: 578 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup wasm-tools
👩💻 [wasm-tools](https://github.com/bytecodealliance/wasm-tools) installer for GitHub Actions
```yml
- 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## Usage
![GitHub Actions](https://img.shields.io/static/v1?style=for-the-badge&message=GitHub+Actions&color=2088FF&logo=GitHub+Actions&logoColor=FFFFFF&label=)
![GitHub](https://img.shields.io/static/v1?style=for-the-badge&message=GitHub&color=181717&logo=GitHub&logoColor=FFFFFF&label=)**🚀 Here's what you're after:**
```yml
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
```### Inputs
- **`wasm-tools-version`:** Which version of wasm-tools to install. This can be an exact version specifier such as `1.0.0` or a semver range like `~1.0.0` or `1.x`. Use `latest` to always install the latest release. Defaults to `latest`.
- **`wasm-tools-token`:** The GitHub token to use when fetching the version list from [bytecodealliance/wasm-tools](https://github.com/bytecodealliance/wasm-tools/releases). You shouldn't have to touch this. The default is the `github.token` if you're on github.com or unauthenticated (rate limited) if you're not on github.com.
### Outputs
- **`wasm-tools-version`:** The version of wasm-tools that was installed. This will be something like `1.0.0` or similar.
- **`cache-hit`:** Whether or not wasm-tools was restored from the runner's cache or download anew.
## Development
![Node.js](https://img.shields.io/static/v1?style=for-the-badge&message=Node.js&color=339933&logo=Node.js&logoColor=FFFFFF&label=)
**How do I test my changes?** \
Open a Draft Pull Request and some magic GitHub Actions will run to test the action.