-
-
Notifications
You must be signed in to change notification settings - Fork 23
84 lines (71 loc) · 2.86 KB
/
build-prod.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
# Build the Android APK on push to the master branch
name: Build Release APK
on:
push:
tags:
- "v*"
- "!v*-test"
env:
GODOT_VERSION: 4.1.3
EXPORT_NAME: immersive-home
jobs:
# job id, can be anything
export_game:
# Always use ubuntu-latest for this action
runs-on: ubuntu-latest
# Add permission for release creation. Can be made narrower according to your needs
permissions: write-all
# Job name, can be anything
name: Export Game
steps:
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/[email protected]
with:
lfs: true
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Android Export
run: |
echo "${{ secrets.KEYSTORE_RELEASE }}" | base64 -di > release.keystore
rm export_presets.cfg
mv export_presets_prod.cfg export_presets.cfg
echo keystore/release="/home/runner/work/Immersive-Home/Immersive-Home/release.keystore" >> ./export_presets.cfg
echo keystore/release_user="${{ secrets.RELEASE_USER }}" >> ./export_presets.cfg
echo keystore/release_password="${{ secrets.RELEASE_PASSWORD }}" >> ./export_presets.cfg
mkdir -p ~/.config/godot
cp -v ./editor_settings-4.tres ~/.config/godot/
mkdir -p ./android/build
touch ./android/build/.gdignore
wget -nv https://downloads.tuxfamily.org/godotengine/4.1.3/Godot_v4.1.3-stable_export_templates.tpz -O ./godot_templates.tpz
unzip -q ./godot_templates.tpz -d .
rm ./godot_templates.tpz
unzip -q ./templates/android_source.zip -d ./android/build/
rm ./templates/android_source.zip
- name: create test artifact
uses: actions/upload-artifact@v2
with:
name: test
path: .
- name: export game
id: export
# Use latest version (see releases for all versions)
uses: firebelley/[email protected]
with:
# Defining all the required inputs
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.1.3/Godot_v4.1.3-stable_linux.x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.1.3/Godot_v4.1.3-stable_export_templates.tpz
relative_project_path: ./
archive_output: true
- name: create release
uses: ncipollo/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
artifacts: ${{ steps.export.outputs.archive_directory }}/* # Added "/*" at the end is glob pattern match for this action