-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (64 loc) · 1.49 KB
/
release.yml
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
name: publishing github pages
on: {
push: {
branches: ['master']
}
}
jobs : {
build: {
runs-on: ubuntu-latest ,
steps: [
{
uses: actions/checkout@v2,
name : Check out repository
},
{
uses : mymindstorm/setup-emsdk@v11,
name : Setup emsdk,
with: {
version: 3.1.9,
actions-cache-folder: 'emsdk-cache'
}
},
{
name: Verifying emsdk,
run : 'emcc --version'
},
{
name: Building App for release,
run : 'make release'
},
{
name: Installing Binaryen,
run : 'sudo apt-get install binaryen'
},
{
name: Optimizing wasm for size,
run: "
cd docs;
wasm-opt index.wasm -o output.wasm -Oz --disable-exception-handling --vacuum;
mv output.wasm index.wasm;
chmod +x index.wasm;
cd -;
"
},
{
name: Commit Files,
run : "
git config --local user.email \"41898282+github-actions[bot]@users.noreply.github.com\";
git config --local user.name \"github-actions[bot]\";
git add docs/ --force;
git commit -m \"Github Actions auto-deploy\" -a;"
},
{
name: Push changes to github-pages,
uses: ad-m/github-push-action@master,
with: {
github_token: "${{ secrets.GIT_GITHUB_TOKEN }}",
branch: "github-pages",
force: true
}
}
]
}
}