Skip to content

Commit b738512

Browse files
committed
ops: init workflows
1 parent a4352b0 commit b738512

File tree

1 file changed

+124
-0
lines changed

1 file changed

+124
-0
lines changed

.github/workflows/godot-ci.yml

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: "godot-ci export"
2+
on: push
3+
4+
# NOTE: If your `project.godot` is at the repository root, set `PROJECT_PATH` below to ".".
5+
6+
env:
7+
GODOT_VERSION: 4.3
8+
EXPORT_NAME: gamejam2025
9+
PROJECT_PATH: .
10+
11+
jobs:
12+
export-windows:
13+
name: Windows Export
14+
runs-on: ubuntu-20.04
15+
container:
16+
image: barichello/godot-ci:4.3
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
lfs: true
22+
- name: Setup
23+
run: |
24+
mkdir -v -p ~/.local/share/godot/export_templates/
25+
mkdir -v -p ~/.config/
26+
mv /root/.config/godot ~/.config/godot
27+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
28+
- name: Windows Build
29+
run: |
30+
mkdir -v -p build/windows
31+
EXPORT_DIR="$(readlink -f build)"
32+
cd $PROJECT_PATH
33+
godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
34+
- name: Upload Artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: windows
38+
path: build/windows
39+
40+
export-linux:
41+
name: Linux Export
42+
runs-on: ubuntu-20.04
43+
container:
44+
image: barichello/godot-ci:4.3
45+
steps:
46+
- name: Checkout
47+
uses: actions/checkout@v4
48+
with:
49+
lfs: true
50+
- name: Setup
51+
run: |
52+
mkdir -v -p ~/.local/share/godot/export_templates/
53+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
54+
- name: Linux Build
55+
run: |
56+
mkdir -v -p build/linux
57+
EXPORT_DIR="$(readlink -f build)"
58+
cd $PROJECT_PATH
59+
godot --headless --verbose --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
60+
- name: Upload Artifact
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: linux
64+
path: build/linux
65+
66+
export-web:
67+
name: Web Export
68+
runs-on: ubuntu-20.04
69+
container:
70+
image: barichello/godot-ci:4.3
71+
steps:
72+
- name: Checkout
73+
uses: actions/checkout@v4
74+
with:
75+
lfs: true
76+
- name: Setup
77+
run: |
78+
mkdir -v -p ~/.local/share/godot/export_templates/
79+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
80+
- name: Web Build
81+
run: |
82+
mkdir -v -p build/web
83+
EXPORT_DIR="$(readlink -f build)"
84+
cd $PROJECT_PATH
85+
godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html"
86+
- name: Upload Artifact
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: web
90+
path: build/web
91+
- name: Install rsync 📚
92+
run: |
93+
apt-get update && apt-get install -y rsync
94+
- name: Deploy to GitHub Pages 🚀
95+
uses: JamesIves/github-pages-deploy-action@releases/v4
96+
with:
97+
branch: gh-pages # The branch the action should deploy to.
98+
folder: build/web # The folder the action should deploy.
99+
100+
export-mac:
101+
name: Mac Export
102+
runs-on: ubuntu-20.04
103+
container:
104+
image: barichello/godot-ci:4.3
105+
steps:
106+
- name: Checkout
107+
uses: actions/checkout@v4
108+
with:
109+
lfs: true
110+
- name: Setup
111+
run: |
112+
mkdir -v -p ~/.local/share/godot/export_templates/
113+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
114+
- name: Mac Build
115+
run: |
116+
mkdir -v -p build/mac
117+
EXPORT_DIR="$(readlink -f build)"
118+
cd $PROJECT_PATH
119+
godot --headless --verbose --export-release "macOS" "$EXPORT_DIR/mac/$EXPORT_NAME.zip"
120+
- name: Upload Artifact
121+
uses: actions/upload-artifact@v4
122+
with:
123+
name: mac
124+
path: build/mac

0 commit comments

Comments
 (0)