-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (54 loc) · 1.96 KB
/
build-html5.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
name: Build for HTML5
on: workflow_dispatch
env:
GODOT_VERSION: 3.5.2
EXPORT_NAME: neomugen
CARGO_TERM_COLOR: always
EMSDK_VERSION: 3.1.21
jobs:
export-html:
name: HTML5 export
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:3.5.2
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get mugen data
run: |
wget https://f000.backblazeb2.com/file/jefersondaniel-public/mugen/neo-mugen-default-data.zip
unzip neo-mugen-default-data.zip && rm neo-mugen-default-data.zip
- name: Setup godot templates
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Install emscripten rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-emscripten
profile: minimal
- name: Install build essentials
run: apt-get update && apt-get install -y --no-install-recommends build-essential clang python3 xz-utils
- name: Setup emscripten sdk
uses: mymindstorm/setup-emsdk@v10
with:
version: ${{env.EMSDK_VERSION}}
- name: Compile native lib for wasm
uses: actions-rs/cargo@v1
with:
toolchain: nightly-2023-11-10
command: build
args: --manifest-path source/native/Cargo.toml --target wasm32-unknown-emscripten --release
env:
C_INCLUDE_PATH: ${{env.EMSDK}}/upstream/emscripten/cache/sysroot/include/
CARGO_TARGET_DIR: source/native/target
- name: Build
run: |
mkdir -v -p exports/web
godot -v --export "HTML5" exports/web/${EXPORT_NAME}.html
- name: Publish Game
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./exports/web