-
-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (101 loc) · 3.01 KB
/
ci.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
name: CI/CD
on:
push:
branches:
- main
pull_request:
merge_group:
schedule:
- cron: "0 14 * * 1" # Every Monday at 9 A.M. CST.
workflow_dispatch:
env:
CI: true
GODOT_VERSION: "4.2.1"
GDTOOLKIT_VERSION: "4.2.2"
DENO_VERSION: "v1.40.3"
permissions:
contents: read
jobs:
build:
name: Build
needs: []
timeout-minutes: ${{ (matrix.target == 'web') && 5 || 10 }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
target:
- quest
include:
- target: quest
os: ubuntu-latest
godot-flags: --export-release "Meta Quest" build/index.html
steps:
- name: 📚 Git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true
- name: 🤖 Set up Godot
uses: chickensoft-games/setup-godot@d3fbddfbafb76fbce64d878aa3d31090e5d0fe0c # v1.5.6
with:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
- name: 🔬 Verify setup
run: godot --version
- name: 🔌 Make and delete directories
run: mkdir build/ && rm -rf addons/{godot-git-plugin,wakatime}
- name: 🔧 Build
run: godot --headless ${{ matrix.godot-flags }}
- name: ⚙️ Upload build
if: matrix.target == 'quest'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: build-${{ matrix.target }}
path: "./build"
if-no-files-found: error
lint:
name: Linting
needs: []
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: 📚 Git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true
- name: 🤖 Set up Godot
uses: Scony/godot-gdscript-toolkit@cbd7a1dcff14cd272787a4ca497c7ff328714a6c # master
with:
version: ${{ env.GDTOOLKIT_VERSION }}
- name: 🔬 Verify setup
run: gdparse --version
- name: 🕵️ Analyze project source
run: gdlint .
format:
name: Formatting
needs: []
timeout-minutes: 3
runs-on: ubuntu-latest
steps:
- name: 📚 Git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
clean: true
persist-credentials: false
set-safe-directory: true
- name: 🤖 Set up Godot
uses: Scony/godot-gdscript-toolkit@cbd7a1dcff14cd272787a4ca497c7ff328714a6c # master
with:
version: ${{ env.GDTOOLKIT_VERSION }}
- name: 🔬 Verify setup
run: gdparse --version
- name: ✨ Verify formatting
run: gdformat --check $(find . -name '*.gd' -not -path "./addons/*")