From 2590d781e3528dc4a41afdf0cf4381655254c89d Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 14:20:44 +0900 Subject: [PATCH 01/23] add export android script --- .idea/.idea.CI demo/.idea/.gitignore | 13 ++++ .idea/.idea.CI demo/.idea/encodings.xml | 4 + .idea/.idea.CI demo/.idea/indexLayout.xml | 8 ++ .idea/.idea.CI demo/.idea/vcs.xml | 6 ++ Assets/Editor.meta | 8 ++ Assets/Editor/Export.cs | 17 ++++ Assets/Editor/Export.cs.meta | 11 +++ ProjectSettings/ProjectSettings.asset | 94 ++++++++++++++++++++++- ci/android/export | 5 ++ 9 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 .idea/.idea.CI demo/.idea/.gitignore create mode 100644 .idea/.idea.CI demo/.idea/encodings.xml create mode 100644 .idea/.idea.CI demo/.idea/indexLayout.xml create mode 100644 .idea/.idea.CI demo/.idea/vcs.xml create mode 100644 Assets/Editor.meta create mode 100644 Assets/Editor/Export.cs create mode 100644 Assets/Editor/Export.cs.meta create mode 100755 ci/android/export diff --git a/.idea/.idea.CI demo/.idea/.gitignore b/.idea/.idea.CI demo/.idea/.gitignore new file mode 100644 index 0000000..4f0927f --- /dev/null +++ b/.idea/.idea.CI demo/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/contentModel.xml +/projectSettingsUpdater.xml +/.idea.CI demo.iml +/modules.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.CI demo/.idea/encodings.xml b/.idea/.idea.CI demo/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.CI demo/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.CI demo/.idea/indexLayout.xml b/.idea/.idea.CI demo/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.CI demo/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.CI demo/.idea/vcs.xml b/.idea/.idea.CI demo/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.CI demo/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Assets/Editor.meta b/Assets/Editor.meta new file mode 100644 index 0000000..3a666e5 --- /dev/null +++ b/Assets/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8dbc73ba898f34e93a0eabb8fedb0014 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Editor/Export.cs b/Assets/Editor/Export.cs new file mode 100644 index 0000000..755127d --- /dev/null +++ b/Assets/Editor/Export.cs @@ -0,0 +1,17 @@ +using UnityEditor; + +// ReSharper disable once CheckNamespace +// ReSharper disable once UnusedType.Global +public static class Export +{ + // ReSharper disable once UnusedMember.Global + public static void Android() + { + EditorUserBuildSettings.exportAsGoogleAndroidProject = true; + + BuildPipeline.BuildPlayer(EditorBuildSettings.scenes, + "build/android", + BuildTarget.Android, + BuildOptions.None); + } +} diff --git a/Assets/Editor/Export.cs.meta b/Assets/Editor/Export.cs.meta new file mode 100644 index 0000000..be81c45 --- /dev/null +++ b/Assets/Editor/Export.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6ca12ca12560c45aabe9e73b7c2f531c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 1069239..8b83ab6 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -268,7 +268,99 @@ PlayerSettings: AndroidValidateAppBundleSize: 1 AndroidAppBundleSizeToValidate: 150 m_BuildTargetIcons: [] - m_BuildTargetPlatformIcons: [] + m_BuildTargetPlatformIcons: + - m_BuildTarget: Android + m_Icons: + - m_Textures: [] + m_Width: 432 + m_Height: 432 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 324 + m_Height: 324 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 216 + m_Height: 216 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 162 + m_Height: 162 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 108 + m_Height: 108 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 81 + m_Height: 81 + m_Kind: 2 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 0 + m_SubKind: + - m_Textures: [] + m_Width: 192 + m_Height: 192 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 144 + m_Height: 144 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 96 + m_Height: 96 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 72 + m_Height: 72 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 48 + m_Height: 48 + m_Kind: 1 + m_SubKind: + - m_Textures: [] + m_Width: 36 + m_Height: 36 + m_Kind: 1 + m_SubKind: m_BuildTargetBatching: [] m_BuildTargetGraphicsJobs: - m_BuildTarget: MacStandaloneSupport diff --git a/ci/android/export b/ci/android/export new file mode 100755 index 0000000..39d0032 --- /dev/null +++ b/ci/android/export @@ -0,0 +1,5 @@ +#!/bin/sh + +set -eux + +/Applications/Unity/Hub/Editor/2020.3.36f1/Unity.app/Contents/MacOS/Unity -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android From 63d484e867cf4ba8a53a0b40376ead9acc5b0cd3 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 14:54:22 +0900 Subject: [PATCH 02/23] =?UTF-8?q?=E4=B8=80=E6=97=A6=20WebGL=20=E3=81=A7?= =?UTF-8?q?=E8=A9=A6=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/android.yml diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..5be2292 --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,18 @@ +name: android build +on: + workflow_dispatch: {} +jobs: + export: + name: export to gradle project + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: export + uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: WebGL + unityVersion: 2020.3.36f1 From 28d4c8e3b3713e3c519eeeeac112494cfab010d0 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 14:59:13 +0900 Subject: [PATCH 03/23] fix ci bug --- .github/workflows/android.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 5be2292..a424693 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -10,9 +10,9 @@ jobs: uses: actions/checkout@v2 - name: export - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: WebGL - unityVersion: 2020.3.36f1 + uses: game-ci/unity-builder@v2 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + with: + targetPlatform: WebGL + unityVersion: 2020.3.36f1 From a72506f83b021ad57ba8bec695bab7ccba528a9d Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:02:07 +0900 Subject: [PATCH 04/23] fix ci bug --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index a424693..db569cc 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,6 +1,6 @@ name: android build on: - workflow_dispatch: {} + - push jobs: export: name: export to gradle project From 14d2818f140596f997d6ebbc76126f6a6f6c277a Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:03:13 +0900 Subject: [PATCH 05/23] fix ci bug --- .github/workflows/android.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index db569cc..95e66af 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,6 +13,6 @@ jobs: uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: WebGL - unityVersion: 2020.3.36f1 + with: + targetPlatform: WebGL + unityVersion: 2020.3.36f1 From 2fcdea6d30d7841e06267e563367fe2c31fb26ae Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:16:47 +0900 Subject: [PATCH 06/23] export androd project --- .github/workflows/android.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 95e66af..88cd1a4 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -14,5 +14,12 @@ jobs: env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} with: - targetPlatform: WebGL + targetPlatform: Android unityVersion: 2020.3.36f1 + buildMethod: Export.Android + + - name: artifact + uses: actions/upload-artifact@v2 + with: + - name: gradle-project + path: ./build/android From 729e4a84d770308990d697a92c5cc496c844f183 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:18:12 +0900 Subject: [PATCH 07/23] fix ci bug --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 88cd1a4..34d923a 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -21,5 +21,5 @@ jobs: - name: artifact uses: actions/upload-artifact@v2 with: - - name: gradle-project - path: ./build/android + name: gradle-project + path: ./build/android From 0cebc507de84492201642c95e9af627b444bb62a Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:43:50 +0900 Subject: [PATCH 08/23] =?UTF-8?q?=E8=AA=BF=E6=9F=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 34d923a..fc36733 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,24 +2,16 @@ name: android build on: - push jobs: - export: - name: export to gradle project + build: + name: build android apps runs-on: ubuntu-latest + container: unity/editor:2020.3.36f1-android-1 steps: - name: checkout uses: actions/checkout@v2 - - name: export - uses: game-ci/unity-builder@v2 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - with: - targetPlatform: Android - unityVersion: 2020.3.36f1 - buildMethod: Export.Android - - - name: artifact - uses: actions/upload-artifact@v2 - with: - name: gradle-project - path: ./build/android + - name: inspect + run: | + which unity + echo $JAVA_HOME + which gradle From 244564627b1c2f8385a35107d79b72adfcc53936 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 15:45:33 +0900 Subject: [PATCH 09/23] fix ci bug --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index fc36733..14f13b7 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,7 +5,7 @@ jobs: build: name: build android apps runs-on: ubuntu-latest - container: unity/editor:2020.3.36f1-android-1 + container: unityci/editor:ubuntu-2020.3.36f1-android-1 steps: - name: checkout uses: actions/checkout@v2 From 1e7c52fc46e2b24f5008772197a0f424f12d8797 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 16:17:11 +0900 Subject: [PATCH 10/23] manual run --- .github/workflows/android.yml | 5 +---- ci/android/export | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 14f13b7..6dec535 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -11,7 +11,4 @@ jobs: uses: actions/checkout@v2 - name: inspect - run: | - which unity - echo $JAVA_HOME - which gradle + run: ./ci/android/export diff --git a/ci/android/export b/ci/android/export index 39d0032..e566902 100755 --- a/ci/android/export +++ b/ci/android/export @@ -2,4 +2,4 @@ set -eux -/Applications/Unity/Hub/Editor/2020.3.36f1/Unity.app/Contents/MacOS/Unity -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android +unity-editor -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android From bad9a4ea62d679cae259f49c888737f8085fe471 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 16:28:03 +0900 Subject: [PATCH 11/23] manual export --- .github/workflows/android.yml | 12 +++++++++++- ci/android/export | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6dec535..3d3ec4b 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -11,4 +11,14 @@ jobs: uses: actions/checkout@v2 - name: inspect - run: ./ci/android/export + run: | + echo "$UNITY_LICENSE" > UnityLicenseFile.ulf + ./ci/android/export + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + + - name: artifact + uses: actions/upload-artifact@v3 + with: + name: android-project + path: build/android diff --git a/ci/android/export b/ci/android/export index e566902..9184755 100755 --- a/ci/android/export +++ b/ci/android/export @@ -2,4 +2,4 @@ set -eux -unity-editor -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android +unity-editor -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android -manualLicenseFile UnityLicenseFile.ulf From 78757261a2a286a415b4d08df8d88fe9b568bfff Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 16:37:28 +0900 Subject: [PATCH 12/23] fix activate license bug --- .github/workflows/android.yml | 1 + ci/android/export | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 3d3ec4b..f981a8d 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,6 +13,7 @@ jobs: - name: inspect run: | echo "$UNITY_LICENSE" > UnityLicenseFile.ulf + unity-editor -logFile -quit -manualLicenseFile UnityLicenseFile.ulf ./ci/android/export env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} diff --git a/ci/android/export b/ci/android/export index 9184755..e566902 100755 --- a/ci/android/export +++ b/ci/android/export @@ -2,4 +2,4 @@ set -eux -unity-editor -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android -manualLicenseFile UnityLicenseFile.ulf +unity-editor -batchmode -quit -logFile - -projectPath . -executeMethod Export.Android From a8ff1ed44a6555c75819ae1da80351f65afd5b80 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:05:32 +0900 Subject: [PATCH 13/23] inspect --- .github/workflows/android.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f981a8d..60f2c67 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -14,7 +14,6 @@ jobs: run: | echo "$UNITY_LICENSE" > UnityLicenseFile.ulf unity-editor -logFile -quit -manualLicenseFile UnityLicenseFile.ulf - ./ci/android/export env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} From ea69513ed3d42c83bb01391c37558496042f776b Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:10:36 +0900 Subject: [PATCH 14/23] =?UTF-8?q?=E7=B5=84=E3=81=BF=E7=9B=B4=E3=81=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 9 +++++---- ci/android/activate | 7 +++++++ 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100755 ci/android/activate diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 60f2c67..dc6e34a 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -10,13 +10,14 @@ jobs: - name: checkout uses: actions/checkout@v2 - - name: inspect - run: | - echo "$UNITY_LICENSE" > UnityLicenseFile.ulf - unity-editor -logFile -quit -manualLicenseFile UnityLicenseFile.ulf + - name: activate unity license + run: ./ci/android/activate env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + - name: export android project + run: ./ci/android/export + - name: artifact uses: actions/upload-artifact@v3 with: diff --git a/ci/android/activate b/ci/android/activate new file mode 100755 index 0000000..db863cc --- /dev/null +++ b/ci/android/activate @@ -0,0 +1,7 @@ +#!/bin/bash + +set -eux + +echo "$UNITY_LICENSE" > UnityLicenseFile.ulf +unity-editor -logFile - -quit -manualLicenseFile UnityLicenseFile.ulf +chmo \ No newline at end of file From 94757d02a88a167b1a1f686e39b3d9c6a7b4f6e0 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:15:42 +0900 Subject: [PATCH 15/23] fix ci bug --- ci/android/activate | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/android/activate b/ci/android/activate index db863cc..b1fbcea 100755 --- a/ci/android/activate +++ b/ci/android/activate @@ -3,5 +3,5 @@ set -eux echo "$UNITY_LICENSE" > UnityLicenseFile.ulf -unity-editor -logFile - -quit -manualLicenseFile UnityLicenseFile.ulf +unity-editor -logFile - -quit -manualLicenseFile UnityLicenseFile.ulf || true chmo \ No newline at end of file From dc0e8e2614b64855b84e1ed395a8b48da5616d12 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:17:41 +0900 Subject: [PATCH 16/23] fix ci bug --- ci/android/activate | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/android/activate b/ci/android/activate index b1fbcea..f415126 100755 --- a/ci/android/activate +++ b/ci/android/activate @@ -4,4 +4,3 @@ set -eux echo "$UNITY_LICENSE" > UnityLicenseFile.ulf unity-editor -logFile - -quit -manualLicenseFile UnityLicenseFile.ulf || true -chmo \ No newline at end of file From c35b4c32abd49f0206b587a79526deaa37648922 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:42:34 +0900 Subject: [PATCH 17/23] =?UTF-8?q?apk=20=E3=81=AE=E4=BD=9C=E6=88=90?= =?UTF-8?q?=E3=81=BE=E3=81=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 8 +++++++- ci/android/install-gradle | 5 +++++ ci/android/package | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100755 ci/android/install-gradle create mode 100755 ci/android/package diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index dc6e34a..726ce9f 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -18,8 +18,14 @@ jobs: - name: export android project run: ./ci/android/export + - name: install gradle + run: ./ci/android/install-gradle + + - name: create aab + run: ./ci/android/package + - name: artifact uses: actions/upload-artifact@v3 with: name: android-project - path: build/android + path: build/android/outputs diff --git a/ci/android/install-gradle b/ci/android/install-gradle new file mode 100755 index 0000000..370ff63 --- /dev/null +++ b/ci/android/install-gradle @@ -0,0 +1,5 @@ +#!/bin/bash + +mkdir -p gradle +wget https://services.gradle.org/distributions/gradle-6.9.3-bin.zip +unzip -d gradle gradle-6.9.3-bin.zip diff --git a/ci/android/package b/ci/android/package new file mode 100755 index 0000000..17d11fb --- /dev/null +++ b/ci/android/package @@ -0,0 +1,3 @@ +#!/bin/bash + +./gradle/gradle-6.9.3/bin/gradle launcher:bundleRelease From ce08d9e66716ad77ccfe17f940cdc4b718ae4cc1 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:47:33 +0900 Subject: [PATCH 18/23] =?UTF-8?q?unzip=20=E3=81=8C=E4=B8=8D=E8=B6=B3?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci/android/install-gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/android/install-gradle b/ci/android/install-gradle index 370ff63..9d389eb 100755 --- a/ci/android/install-gradle +++ b/ci/android/install-gradle @@ -1,5 +1,7 @@ #!/bin/bash +apt-get -qy update && apt-get -qy install unzip || true + mkdir -p gradle wget https://services.gradle.org/distributions/gradle-6.9.3-bin.zip unzip -d gradle gradle-6.9.3-bin.zip From 9fab58759fd2533fad02c89fa9459858f8ba6c7e Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:53:02 +0900 Subject: [PATCH 19/23] =?UTF-8?q?=E3=83=93=E3=83=AB=E3=83=89=E6=99=82?= =?UTF-8?q?=E3=81=AE=E4=BD=9C=E6=A5=AD=E3=83=87=E3=82=A3=E3=83=AC=E3=82=AF?= =?UTF-8?q?=E3=83=88=E3=83=AA=E9=96=93=E9=81=95=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci/android/package | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/android/package b/ci/android/package index 17d11fb..97f6a89 100755 --- a/ci/android/package +++ b/ci/android/package @@ -1,3 +1,4 @@ #!/bin/bash +cd build/android ./gradle/gradle-6.9.3/bin/gradle launcher:bundleRelease From 47d101078a84b66ed6831c144a4bedf2f1abc23d Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 17:53:51 +0900 Subject: [PATCH 20/23] =?UTF-8?q?gradle=20=E3=81=AE=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB=E5=85=88=E9=96=93=E9=81=95?= =?UTF-8?q?=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci/android/install-gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/android/install-gradle b/ci/android/install-gradle index 9d389eb..3692e9c 100755 --- a/ci/android/install-gradle +++ b/ci/android/install-gradle @@ -2,6 +2,7 @@ apt-get -qy update && apt-get -qy install unzip || true +cd build/android mkdir -p gradle wget https://services.gradle.org/distributions/gradle-6.9.3-bin.zip unzip -d gradle gradle-6.9.3-bin.zip From 84b5a0cd9a07a18b0ef62bcbdf116249209dbffc Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 18:01:44 +0900 Subject: [PATCH 21/23] no JAVA_HOME --- .github/workflows/android.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 726ce9f..55ac3ba 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,6 +23,11 @@ jobs: - name: create aab run: ./ci/android/package + env: + # https://github.com/masakura2/unity-ci-demo/actions/runs/3335939692/jobs/5520492479 + # ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + # なんでやろう... + JAVA_HOME: /opt/unity/Editor/Data/PlayerbackEngines/AndroidPlayer/OpenJDK - name: artifact uses: actions/upload-artifact@v3 From 8321507b337f91aa05bba72066e893b241c5543a Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 18:09:37 +0900 Subject: [PATCH 22/23] fix JAVA_HOME --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 55ac3ba..e30db14 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -27,7 +27,7 @@ jobs: # https://github.com/masakura2/unity-ci-demo/actions/runs/3335939692/jobs/5520492479 # ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. # なんでやろう... - JAVA_HOME: /opt/unity/Editor/Data/PlayerbackEngines/AndroidPlayer/OpenJDK + JAVA_HOME: /opt/unity/Editor/Data/PlaybackEngines/AndroidPlayer/OpenJDK - name: artifact uses: actions/upload-artifact@v3 From 5e95bcd63fb88c43a93aa9f7b35bbe69fa3fe272 Mon Sep 17 00:00:00 2001 From: Tomo Masakura Date: Thu, 27 Oct 2022 18:28:25 +0900 Subject: [PATCH 23/23] =?UTF-8?q?=E6=88=90=E6=9E=9C=E7=89=A9=E3=81=8C?= =?UTF-8?q?=E6=8B=BE=E3=81=88=E3=81=A6=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e30db14..cd8e541 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -33,4 +33,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: android-project - path: build/android/outputs + path: build/android/launcher/build/outputs