From b205a1e2775aebbb8551af10575a413fc7043afc Mon Sep 17 00:00:00 2001 From: Myzel394 <50424412+Myzel394@users.noreply.github.com> Date: Sun, 6 Aug 2023 20:36:03 +0200 Subject: [PATCH] feat(ci-cd): Add release app --- .github/workflows/release-app.yaml | 45 ++++++++++++++++++++++++++++++ .gitignore | 1 + app/build.gradle | 8 ++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/workflows/release-app.yaml diff --git a/.github/workflows/release-app.yaml b/.github/workflows/release-app.yaml new file mode 100644 index 0000000..d35f697 --- /dev/null +++ b/.github/workflows/release-app.yaml @@ -0,0 +1,45 @@ +name: Build and publish app + +on: + release: + types: [ published ] + +jobs: + build-app: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Write Keystore file 🗄️ + id: android_keystore + uses: timheuer/base64-to-file@v1.0.3 + with: + fileName: key.jks + encodedString: ${{ secrets.KEYSTORE }} + + - name: Write Keystore properties 🗝️ + run: | + echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties + echo "storePassword=${{ secrets.SIGNING_STORE_PASSWORD }}" >> android/key.properties + echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> android/key.properties + + - name: Setup Java + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: "17.x" + cache: 'gradle' + + - name: Build APKs 📱 + run: ./gradlew assembleRelease + + - name: Upload APKs 🚀 + uses: actions/upload-artifact@v3 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + name: app + path: app/build/outputs/apk/debug/*.apk \ No newline at end of file diff --git a/.gitignore b/.gitignore index aa724b7..1459e16 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .externalNativeBuild .cxx local.properties +key.properties diff --git a/app/build.gradle b/app/build.gradle index 6c322f9..4572dd9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,6 +14,14 @@ android { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) } + splits { + abi { + enable true + + universalApk true + } + } + defaultConfig { multiDexEnabled true applicationId "app.myzel394.alibi"