-
-
Notifications
You must be signed in to change notification settings - Fork 61
59 lines (56 loc) · 2.48 KB
/
dev-build.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: CI
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GODOT_VERSION: 4.2.2-rc2
GODOT_VERSION_DOT: 4.2.2.rc2
EXPORT_NAME: GodSVG
jobs:
export:
name: Export GodSVG
runs-on: ubuntu-latest
steps:
- name: Setup Godot and folders
run: |
mkdir -v -p ~/build/windows-64bit ~/build/linux-64bit ~/.local/share/godot/export_templates
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_export_templates.tpz
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_linux.x86_64.zip
unzip Godot_v${GODOT_VERSION}_linux.x86_64.zip -d ~
unzip Godot_v${GODOT_VERSION}_export_templates.tpz -d ~
mv ~/templates/ ~/.local/share/godot/export_templates/${GODOT_VERSION_DOT}
~/Godot_v${GODOT_VERSION}_linux.x86_64 --headless --quit
- name: Setup WINE and rcedit for Windows export
run: |
dpkg --add-architecture i386 && apt-get update && apt-get install -y wine-stable && apt-get install -y wine32
wget -q https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe
mkdir -v -p ~/.local/share/rcedit
mv rcedit-x64.exe ~/.local/share/rcedit
echo 'export/windows/wine = "/usr/bin/wine"' >> ~/.config/godot/editor_settings-4.tres
echo 'export/windows/rcedit = "/github/home/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-4.tres
- name: Checkout repo
uses: actions/checkout@v4
- name: Build Windows executable
run: |
~/Godot_v${GODOT_VERSION}_linux.x86_64 --headless -v --export-release "Windows Desktop" ~/build/windows-64bit/$EXPORT_NAME.exe
- name: Build Linux executable
run: |
~/Godot_v${GODOT_VERSION}_linux.x86_64 --headless -v --export-release "Linux/X11" ~/build/linux-64bit/$EXPORT_NAME.x86_64
chmod +x ~/build/linux-64bit/$EXPORT_NAME.x86_64
cd ~/build
tar zcvf linux-64bit.tar.gz linux-64bit
- name: Upload Windows Artifact
uses: actions/upload-artifact@v4
with:
name: Windows-64bit
path: ~/build/windows-64bit/
retention-days: 14
- name: Upload Linux Artifact
uses: actions/upload-artifact@v4
with:
name: Linux-64bit
path: ~/build/linux-64bit.tar.gz
retention-days: 14