mirror of
https://github.com/Xevion/rust-sdl2-emscripten.git
synced 2025-12-07 13:16:28 -06:00
Add Linux & Windows deploys
This commit is contained in:
52
.github/workflows/wasm.yaml
vendored
Normal file
52
.github/workflows/wasm.yaml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: WebAssembly (GitHub Pages)
|
||||
|
||||
on: [push]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Emscripten SDK
|
||||
uses: mymindstorm/setup-emsdk@v11
|
||||
with:
|
||||
version: 3.1.43
|
||||
|
||||
- name: Setup Rust (WASM32 Emscripten)
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
target: wasm32-unknown-emscripten
|
||||
override: true
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v3
|
||||
with:
|
||||
version: 8
|
||||
run_install: true
|
||||
|
||||
- name: Build
|
||||
run: ./scripts/build.sh -er # release mode, skip emsdk
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-pages-artifact@v2
|
||||
with:
|
||||
path: './dist/'
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
||||
|
||||
- name: Deploy
|
||||
uses: actions/deploy-pages@v2
|
||||
Reference in New Issue
Block a user