Create main.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scram My Shit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm install | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install wasm32 toolchain | |
run: rustup target add wasm32-unknown-unknown | |
- name: Install wasm-bindgen-cli | |
run: cargo install wasm-bindgen-cli | |
- name: Install wasm-opt | |
run: sudo apt-get update && sudo apt-get install -y binaryen | |
- name: Build Rewriter | |
run: npm run rewriter:build | |
- name: Run npm build | |
run: npm run build |