-
Notifications
You must be signed in to change notification settings - Fork 2
122 lines (120 loc) · 4.94 KB
/
Copy pathci.yml
File metadata and controls
122 lines (120 loc) · 4.94 KB
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
112
113
114
115
116
117
118
119
120
121
122
name: Build
on:
workflow_dispatch:
inputs:
version:
type: string
description: Version
required: true
version-code:
type: number
description: Version Code
required: true
env:
GODOT_VERSION: "4.6.1"
EXPORT_NAME: latin-defense
PROJECT_PATH: .
GAME_VERSION: ${{ github.event.inputs.version }}
GAME_VERSION_CODE: ${{ github.event.inputs.version-code }}
KEYSTORE_CONTENT: ${{ secrets.GODOT_ANDROID_KEYSTORE_CONTENT }}
GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD: ${{ secrets.GODOT_ANDROID_KEYSTORE_KEY }}
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Install Godot
run: |
wget -O godot.zip https://github.com/godotengine/godot/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_linux.x86_64.zip
unzip godot.zip
mv ./Godot_v$GODOT_VERSION-stable_linux.x86_64 godot
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install docker.io adb git python3 pipx python3-setuptools openjdk-17-jdk android-sdk -y
pipx install clickable-ut
echo 'export PATH="$PATH:$HOME/.local/bin"' >> ~/.bashrc
- name: Decode Android keystore
run: |
echo "$KEYSTORE_CONTENT" | base64 -d > release.keystore
- name: Download export templates
run: |
wget -O templates.zip https://github.com/godotengine/godot/releases/download/$GODOT_VERSION-stable/Godot_v$GODOT_VERSION-stable_export_templates.tpz
unzip templates.zip
- name: Build Linux
run: |
./godot --headless --export-release "Linux Flatpak amd64" latin-defense
- name: Build Windows
run: |
./godot --headless --export-release "Windows Desktop" latindefense.exe
- name: Build Web
run: |
mkdir web
./godot --headless --export-release "Web Export" web/index.html
zip -r web.zip web/
- name: Build Android APK
run: |
GODOT_ANDROID_KEYSTORE_RELEASE_PATH=./release.keystore ./godot --headless --export-release "Android" latindefense.apk
- name: Build Android AAB
run: |
GODOT_ANDROID_KEYSTORE_RELEASE_PATH=./release.keystore ./godot --headless --export-release "Android (AAB)" latindefense.aab
- name: Build Ubuntu Touch
run: |
./godot --headless --export-release "Linux Flatpak arm64" latin-defense-arm64
mv latin-defense-arm64 click/latin-defense
cd click
clickable build --arch=arm64
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: latin-defense-build
path: |
./latin-defense
./latin-defense-arm64
./latindefense.exe
./latindefense.apk
./latindefense.aab
./web.zip
./click/build/aarch64-linux-gnu/app/bommbomm34.latindefense_$GAME_VERSION_arm64.click
overwrite: true
# publish:
# name: Publish
# runs-on: ubuntu-latest
# steps:
# - name: Install dependencies
# run: |
# wget https://broth.itch.zone/butler/linux-amd64/LATEST/archive.zip
# unzip archive.zip
# - name: Download artifact
# uses: actions/download-artifact@v8
# - name: Prepare files
# run: |
# mv ./latin-defense-build/latin-defense ./latin-defense-linux-amd64
# mv ./latin-defense-build/latin-defense-arm64 ./latin-defense-linux-arm64
# mv ./latin-defense-build/latindefense.exe ./latindefense.exe
# mv ./latin-defense-build/web.zip ./web.zip
# mv ./latin-defense-build/bommbomm34.latindefense_$GAME_VERSION_arm64.click ./latindefense.click
# mv ./latin-defense-build/latindefense.apk latindefense.apk
# mv ./latin-defense-build/latindefense.aab latindefense.aab
# cp latin-defense-linux-amd64 latin-defense
# zip latin-defense.zip latin-defense
# rm latin-defense
# - name: Publish GitHub
# uses: softprops/action-gh-release@v2
# if: github.ref_type == 'tag'
# with:
# name: Release ${{ github.event.inputs.version }}
# body_path: metadata/en-US/changelogs/${{ github.event.inputs.version-code }}.txt
# make_latest: true
# files: |
# latin-defense-linux-amd64
# latin-defense-linux-arm64
# latindefense.exe
# latindefense.apk
# - name: Publish itch.io
# run: |
# ./butler push latindefense.exe bommbomm34/latin-defense:windows --userversion $GAME_VERSION
# ./butler push latindefense.apk bommbomm34/latin-defense:android --userversion $GAME_VERSION
# ./butler push web.zip bommbomm34/latin-defense:web --userversion $GAME_VERSION
# ./butler push latin-defense.zip bommbomm34/latin-defense:linux --userversion $GAME_VERSION