From a0433a565932dfc982656c991cf36f545c0cb056 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Wed, 13 Dec 2023 23:50:39 +0100 Subject: [PATCH] update workflows --- .github/workflows/build-debug.yml | 2 +- .github/workflows/build-prod.yml | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index 15bdfa5..0381086 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -62,7 +62,7 @@ jobs: export_debug: true relative_project_path: ./ archive_output: true - presets_to_export: "Android" + filter_exports: "Android" - name: create release uses: ncipollo/release-action@v1.11.2 diff --git a/.github/workflows/build-prod.yml b/.github/workflows/build-prod.yml index af4f675..da409d9 100644 --- a/.github/workflows/build-prod.yml +++ b/.github/workflows/build-prod.yml @@ -49,7 +49,20 @@ jobs: 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 + + sed -i 's/singleInstancePerTask/singleTask/g' ./android/build/AndroidManifest.xml + versioncode=$(eval "git tag | grep -v "test" | wc -l") + sed -i "s/BUILD_VERSION_CODE/$versioncode/g" export_presets.cfg + sed -i "s/android:versionCode=\"1\"/android:versionCode=\"$versioncode\"/g" ./android/build/AndroidManifest.xml + + sed -i 's/BUILD_VERSION/${{ github.ref_name }}/g' export_presets.cfg + sed -i "s/android:versionName=\"1.0\"/android:versionName=\"${{ github.ref_name }}\"/g" ./android/build/AndroidManifest.xml - name: export game id: export @@ -62,8 +75,6 @@ jobs: relative_project_path: ./ archive_output: true filter_exports: "AndroidProduction" - version: ${{ github.ref_name }}" - production: true - name: create release uses: ncipollo/release-action@v1.11.2