Merge pull request #34 from Nitwel/testing

Add automatic builds
This commit is contained in:
Nitwel 2023-11-20 18:06:36 +01:00 committed by GitHub
commit a0cebfefe5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 19 deletions

View File

@ -2,29 +2,76 @@
name: Build APK name: Build APK
on: on:
push: push:
branches: tags:
- main - "v*-test"
env: env:
GODOT_VERSION: 4.1.3-stable GODOT_VERSION: 4.1.3
EXPORT_NAME: immersive-home EXPORT_NAME: immersive-home
jobs: jobs:
build: # job id, can be anything
runs-on: ubuntu-20.04 export_game:
container: # Always use ubuntu-latest for this action
image: barichello/godot-ci:${GODOT_VERSION} 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: steps:
- name: Checkout # Always include the checkout step so that
uses: actions/checkout@v2 # your project is available for Godot to export
- name: checkout
uses: actions/checkout@v3.3.0
with: with:
lfs: true lfs: true
- name: Android Export
run: | - name: Set up JDK 17
mkdir -v -p build/android uses: actions/setup-java@v3
godot -v --export-debug --headless "Android" /build/android/${EXPORT_NAME}-debug.apk
- name: Upload APK
uses: actions/upload-artifact@v1
with: with:
name: ${EXPORT_NAME}-debug java-version: "17"
path: build/android/${EXPORT_NAME}-debug.apk distribution: "temurin"
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Setup Android Export
run: |
keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12
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: export game
id: export
# Use latest version (see releases for all versions)
uses: firebelley/godot-export@v5.2.1
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
export_debug: true
relative_project_path: ./
archive_output: true
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: immersive-home-debug
path: ${{ steps.export.outputs.archive_directory }}
- name: create release
uses: ncipollo/release-action@v1.11.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
artifacts: ${{ steps.export.outputs.archive_directory }}/* # Added "/*" at the end is glob pattern match for this action

3
editor_settings-4.tres Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:05ad3273db12b74c881ed1cb4600bb2510f06656a0c48f1d7b0362080eede8d6
size 324

View File

@ -1,6 +1,6 @@
[preset.0] [preset.0]
name="Andorid" name="Android"
platform="Android" platform="Android"
runnable=true runnable=true
dedicated_server=false dedicated_server=false
@ -8,7 +8,7 @@ custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="*.j2" include_filter="*.j2"
exclude_filter="" exclude_filter=""
export_path="" export_path="builds/android/immersive-home.apk"
encryption_include_filters="" encryption_include_filters=""
encryption_exclude_filters="" encryption_exclude_filters=""
encrypt_pck=false encrypt_pck=false