-
-
Notifications
You must be signed in to change notification settings - Fork 61
93 lines (87 loc) · 2.92 KB
/
dev-build.yml
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
name: CI
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GODOT_VERSION: 4.2.2
GODOT_RELEASE: rc3
PROJECT_NAME: GodSVG
jobs:
export-windows:
name: Export GodSVG for Windows
runs-on: ubuntu-latest
env:
PLATFORM: "Windows Desktop"
EXTENSION: "exe"
BUILD_NAME: "windows-64bit"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Godot
uses: ./.github/actions/setup-godot
with:
version: ${{ env.GODOT_VERSION }}
release: ${{ env.GODOT_RELEASE }}
- name: Set up WINE and rcedit for Windows export
run: |
# Download rcedit and intall wine.
wget -q https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe &
sudo dpkg --add-architecture i386 &
sudo apt-get update
sudo apt-get install -y wine-stable
sudo apt-get install -y wine32
wait
mkdir -v -p ~/.local/share/rcedit
mv rcedit-x64.exe ~/.local/share/rcedit
cd ~
# Run Godot to generate config file.
godot --headless --quit
# Add wine and rcedit paths to Godot config.
echo 'export/windows/wine = "/usr/bin/wine"' >> ~/.config/godot/editor_settings-4.tres
echo 'export/windows/rcedit = "/home/runner/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-4.tres
- name: Build
run: |
mkdir -v -p ~/build/${BUILD_NAME}
godot --headless -v --export-release "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}
path: ~/build/${{ env.BUILD_NAME }}/
if-no-files-found: error
retention-days: 14
export-linux:
name: Export GodSVG for Linux
runs-on: ubuntu-latest
env:
PLATFORM: "Linux/X11"
EXTENSION: "x86_64"
BUILD_NAME: "linux-64bit"
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Godot
uses: ./.github/actions/setup-godot
with:
version: ${{ env.GODOT_VERSION }}
release: ${{ env.GODOT_RELEASE }}
- name: Build
run: |
mkdir -v -p ~/build/${BUILD_NAME}
godot --headless -v --export-release "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
- name: Make Linux export runnable
run: |
# Set run permission.
chmod +x ~/build/${BUILD_NAME}/${PROJECT_NAME}.x86_64
cd ~/build
tar zcvf ${BUILD_NAME}.tar.gz ${BUILD_NAME}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_NAME }}
path: ~/build/${{ env.BUILD_NAME }}.tar.gz
if-no-files-found: error
retention-days: 14