-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 1.82 KB
/
build-windows.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
name: Build for Windows
on: workflow_dispatch
env:
GODOT_VERSION: 3.5.2
EXPORT_NAME: mugen
CARGO_TERM_COLOR: always
jobs:
export-windows:
name: Windows 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://github.com/jefersondaniel/godot-mugen-data/archive/refs/tags/1.0.0.zip -O mugen-data.zip
unzip mugen-data.zip && rm mugen-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 windows rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-pc-windows-gnu
profile: minimal
- name: Install build essentials
run: apt-get update && apt-get install -y --no-install-recommends build-essential clang llvm-dev libclang-dev mingw-w64
- name: Compile native lib for windows
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path source/native/Cargo.toml --target x86_64-pc-windows-gnu --release
env:
CC: x86_64-w64-mingw32-gcc
CARGO_TARGET_DIR: source/native/target
- name: Build
env:
SCRIPT_AES256_ENCRYPTION_KEY: ${{ secrets.SCRIPT_AES256_ENCRYPTION_KEY }}
run: |
mkdir -v -p exports/windows
godot -v --export "Windows" exports/windows/${EXPORT_NAME}.exe
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: Windows build
path: exports/windows
retention-days: 7