immersive-home/.github/workflows/build-debug.yml

80 lines
2.7 KiB
YAML
Raw Normal View History

2023-11-20 13:32:42 +02:00
# Build the Android APK on push to the master branch
name: Build APK
on:
push:
2023-11-20 19:12:45 +02:00
branches:
- main
2023-11-20 19:05:20 +02:00
tags:
- "v*-test"
2023-11-20 13:32:42 +02:00
env:
2023-11-20 13:47:24 +02:00
GODOT_VERSION: 4.1.3
2023-11-20 13:32:42 +02:00
EXPORT_NAME: immersive-home
jobs:
2023-11-20 16:10:15 +02:00
# 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
2023-11-20 13:32:42 +02:00
steps:
2023-11-20 16:10:15 +02:00
# Always include the checkout step so that
# your project is available for Godot to export
- name: checkout
uses: actions/checkout@v3.3.0
2023-11-20 17:21:01 +02:00
with:
lfs: true
2023-11-20 16:10:15 +02:00
2023-11-20 16:18:43 +02:00
- 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
2023-11-20 16:31:08 +02:00
- 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
2023-11-20 18:02:06 +02:00
cp -v ./editor_settings-4.tres ~/.config/godot/
2023-11-20 16:44:59 +02:00
2023-11-20 16:48:09 +02:00
mkdir -p ./android/build
2023-11-20 16:44:59 +02:00
touch ./android/build/.gdignore
2023-11-20 18:32:29 +02:00
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
2023-11-20 16:59:02 +02:00
- 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
2023-11-20 18:32:29 +02:00
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: immersive-home-debug
path: ${{ steps.export.outputs.archive_directory }}
2023-11-20 19:05:20 +02:00
- 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