-
Notifications
You must be signed in to change notification settings - Fork 40
92 lines (88 loc) · 2.29 KB
/
browser.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Browser
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-wasm:
name: Build WASM
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@master
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Rust Cache
uses: Swatinem/rust-cache@v2
with:
key: browser
- name: Build
run: wasm-pack build libs/paa --target web --features wasm
- name: Rename
run: |
mv libs/paa/pkg/hemtt_paa_bg.wasm hemtt_paa_bg.wasm
mv libs/paa/pkg/hemtt_paa.js hemtt_paa.js
- name: Upload
uses: actions/upload-artifact@v4
with:
name: wasm
path: |
hemtt_paa_bg.wasm
hemtt_paa.js
firefox:
name: Firefox
runs-on: ubuntu-latest
needs: build-wasm
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Download wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: wasm
- name: Move wasm
run: |
mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
mv wasm/hemtt_paa.js browser/hemtt_paa.js
- name: Rename manifest
run: mv browser/manifest.firefox.json browser/manifest.json && rm browser/manifest.chrome.json
- name: zip
run: |
cd browser
zip -r firefox.zip *
mv firefox.zip ../firefox.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: firefox
path: firefox.zip
chrome:
name: Chrome
runs-on: ubuntu-latest
needs: build-wasm
steps:
- name: Checkout the source code
uses: actions/checkout@v4
- name: Download wasm
uses: actions/download-artifact@v4
with:
name: wasm
path: wasm
- name: Move wasm
run: |
mv wasm/hemtt_paa_bg.wasm browser/hemtt_paa_bg.wasm
mv wasm/hemtt_paa.js browser/hemtt_paa.js
- name: Rename manifest
run: mv browser/manifest.chrome.json browser/manifest.json && rm browser/manifest.firefox.json
- name: zip
run: |
cd browser
zip -r chrome.zip *
mv chrome.zip ../chrome.zip
- name: Upload
uses: actions/upload-artifact@v4
with:
name: chrome
path: chrome.zip