Create automatic builds for Windows and Linux #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
concurrency: | |
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-devdesktop | |
cancel-in-progress: true | |
env: | |
GODOT_VERSION: 4.2.1 | |
EXPORT_NAME: GodSVG | |
jobs: | |
export-windows: | |
name: Windows Export | |
runs-on: ubuntu-latest | |
container: | |
image: docker://barichello/godot-ci:4.2.1 | |
steps: | |
- name: Setup WINE and rcedit | |
run: | | |
dpkg --add-architecture i386 && apt-get update && apt-get install -y wine-stable && apt-get install -y wine32 | |
chown root:root -R ~ | |
wget 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 | |
godot --headless --quit | |
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 | |
uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
mkdir -v -p build/windows-64bit ~/.local/share/godot/export_templates | |
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable | |
- name: Windows Build | |
run: godot --headless -v --export-release "Windows Desktop" ./build/windows-64bit/$EXPORT_NAME.exe | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows-64bit | |
path: ./build/windows-64bit/ | |
retention-days: 14 | |
export-linux: | |
name: Linux Export | |
runs-on: ubuntu-latest | |
container: | |
image: docker://barichello/godot-ci:4.2.1 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
run: | | |
mkdir -v -p build/linux-64bit ~/.local/share/godot/export_templates | |
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable | |
- name: Linux Build | |
run: | | |
godot --headless -v --export-release "Linux/X11" ./build/linux-64bit/$EXPORT_NAME.x86_64 | |
- name: Give execute permission | |
run: | | |
chmod +x ./build/linux-64bit/$EXPORT_NAME.x86_64 | |
- name: Create tar.gz archive | |
run: | | |
cd build | |
tar zcvf linux-64bit.tar.gz linux-64bit | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux-64bit | |
path: ./build/linux-64bit.tar.gz | |
retention-days: 14 |