Rebrand app as VectorTouch
#136
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
# Which godot version to use for exporting. | |
GODOT_VERSION: 4.5 | |
# Which godot release to use for exporting. (stable/rc/beta/alpha) | |
GODOT_RELEASE: beta4 | |
# Used in the editor config file name. Do not change this for patch releases. | |
GODOT_FEATURE_VERSION: 4.5 | |
# Commit hash | |
GODOT_COMMIT_HASH: 2d113cc22 | |
PROJECT_NAME: VectorTouch | |
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes disable_physics_2d=yes disable_navigation_2d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes module_mbedtls_enabled=yes swappy=no build_profile=../vectortouch/.github/disabled_classes.build | |
GODOT_REPO: https://github.com/godotengine/godot.git | |
jobs: | |
format: | |
name: File formatting (file_format.sh) | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: sudo apt-get update -qq && sudo apt-get install -yq --no-install-recommends dos2unix recode | |
- name: File formatting checks (file_format.sh) | |
run: bash ./.github/file_format.sh | |
build-android: | |
name: Export for Android | |
runs-on: ubuntu-latest | |
env: | |
PLATFORM: "Android" | |
steps: | |
- name: Cache Template | |
id: cache-template | |
uses: actions/cache@v3 | |
with: | |
key: template-${{ env.PLATFORM }}-${{ env.GODOT_VERSION }}-${{ env.GODOT_RELEASE }}-${{ env.BUILD_OPTIONS }} | |
path: | | |
~/.local/share/godot/export_templates/ | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Set up Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Check Installed Android SDK Packages | |
run: | | |
echo "Checking installed Android SDK packages..." | |
/usr/local/lib/android/sdk/cmdline-tools/latest/bin/sdkmanager --list_installed | |
- name: Set up Godot Editor | |
run: | | |
mkdir -p ~/godot-editor | |
cd ~/godot-editor | |
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-${GODOT_RELEASE}/Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip | |
unzip Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64.zip | |
mv ./Godot_v${GODOT_VERSION}-${GODOT_RELEASE}_linux.x86_64 ~/godot-editor/godot | |
echo "~/godot-editor" >> $GITHUB_PATH | |
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | |
name: Install dependencies | |
run: sudo apt-get install -y scons python3 | |
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | |
name: Clone Godot repository | |
run: git clone $GODOT_REPO godot | |
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | |
name: Checkout specific commit | |
run: | | |
cd godot | |
git fetch | |
git checkout $GODOT_COMMIT_HASH | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: vectortouch | |
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | |
name: Build Godot template for Android | |
run: | | |
cd godot | |
scons p=android arch=arm64 generate_apk=yes ${BUILD_OPTIONS} target=template_debug | |
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/ | |
mv ./bin/android_debug.apk ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_debug.apk | |
mv ./bin/android_source.zip ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_source.zip | |
- if: ${{ steps.cache-template.outputs.cache-hit != 'true' }} | |
name: Build Godot release template for Android | |
run: | | |
cd godot | |
scons p=android arch=arm32 ${BUILD_OPTIONS} target=template_release | |
scons p=android arch=arm64 ${BUILD_OPTIONS} target=template_release generate_apk=yes | |
mkdir -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/ | |
mv ./bin/android_release.apk ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_release.apk | |
mv ./bin/android_source.zip ~/.local/share/godot/export_templates/${GODOT_VERSION}.${GODOT_RELEASE}/android_source.zip | |
- name: Export debug project | |
env: | |
GODOT_ANDROID_KEYSTORE_DEBUG_PATH: "./godot_only/debug.keystore" | |
GODOT_ANDROID_KEYSTORE_DEBUG_USER: "androiddebugkey" | |
GODOT_ANDROID_KEYSTORE_DEBUG_PASSWORD: "android" | |
run: | | |
cd vectortouch | |
mkdir -p build/android | |
godot --headless --export-debug "Android" build/android/VectorTouch-debug.apk | |
- name: Export release project | |
if: github.event.pull_request.head.repo.fork != true | |
env: | |
GODOT_ANDROID_KEYSTORE_RELEASE_PATH: "/tmp/release.keystore" | |
GODOT_ANDROID_KEYSTORE_RELEASE_USER: ${{ secrets.KEY_ALIAS }} | |
GODOT_ANDROID_KEYSTORE_RELEASE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }} | |
run: | | |
cd vectortouch | |
mkdir -p build/android | |
echo "${{ secrets.KEYSTORE }}" | base64 -d > /tmp/release.keystore | |
godot --headless --export-release "Android(arm32)" build/android/VectorTouch-arm32.apk | |
godot --headless --export-release "Android" build/android/VectorTouch.apk | |
- name: Upload debug artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PROJECT_NAME }}.debug | |
path: vectortouch/build/android/VectorTouch-debug.apk | |
if-no-files-found: error | |
retention-days: 28 | |
- name: Upload release artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PROJECT_NAME }} | |
path: vectortouch/build/android/VectorTouch.apk | |
if-no-files-found: ignore | |
retention-days: 28 | |
- name: Upload arm32 APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.PROJECT_NAME }}-arm32 | |
path: vectortouch/build/android/VectorTouch-arm32.apk | |
if-no-files-found: ignore | |
retention-days: 28 |