-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.07 KB
/
rust.yml
File metadata and controls
49 lines (40 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Checkout built branch
run: |
git checkout built || git checkout -b built
git reset --hard origin/main
- name: Build WASM (Release)
run: |
cd nicehtml_transpiler
wasm-pack build --target web --release
cd ..
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
- name: Commit and Push Changes
run: |
git add -f nicehtml_transpiler/pkg
git commit -m "Deploy release build to built branch" || exit 0
git push -f origin built