Skip to content

Commit e7d192f

Browse files
Add GitHub Actions workflow for building Godot project
1 parent e44e786 commit e7d192f

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build Godot Project
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
platform: [Windows Desktop, Linux]
15+
steps:
16+
# Checkout the repository
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Set up Godot Headless
21+
- name: Download Godot Headless
22+
run: |
23+
wget https://downloads.tuxfamily.org/godotengine/4.4.1/mono/Godot_v4.4.1-stable_mono_linux_headless.64.zip -O godot.zip
24+
unzip godot.zip -d godot
25+
chmod +x godot/Godot_v4.4.1-stable_mono_linux_headless.64
26+
mv godot/Godot_v4.4.1-stable_mono_linux_headless.64 /usr/local/bin/godot
27+
28+
# Export the project
29+
- name: Export project for ${{ matrix.platform }}
30+
run: |
31+
godot --headless --export-debug --verbose "${{ matrix.platform }}"
32+
33+
# Upload the exported build as an artifact
34+
- name: Upload build artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: build-${{ matrix.platform }}
38+
path: export/${{ matrix.platform }}

0 commit comments

Comments
 (0)