Skip to content

Commit

Permalink
Create automatic builds for Windows and Linux (#640)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiisu-Master authored Apr 7, 2024
1 parent 7f53d37 commit a30236f
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 4 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
8 changes: 4 additions & 4 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="web-build/*, *.md, visual/editor_only/*"
export_path="../GodSVG meta/GodSVG exports/GodSVG_windows.exe"
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
Expand All @@ -17,7 +17,7 @@ encrypt_directory=false
[preset.0.options]

custom_template/debug=""
custom_template/release="/home/volter/Desktop/godot/bin/godot.windows.template_release.x86_64.exe"
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
Expand Down Expand Up @@ -71,7 +71,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="web-build/*, *.md, *.ico, visual/editor_only/*"
export_path="../GodSVG meta/GodSVG exports/GodSVG_linuxbsd.x86_64"
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
Expand All @@ -80,7 +80,7 @@ encrypt_directory=false
[preset.1.options]

custom_template/debug=""
custom_template/release="/home/volter/Desktop/godot/bin/godot.linuxbsd.template_release.x86_64"
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
Expand Down

0 comments on commit a30236f

Please sign in to comment.