feat(ci-cd): Add release app

This commit is contained in:
Myzel394 2023-08-06 20:36:03 +02:00
parent 3f680b2960
commit b205a1e277
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B
3 changed files with 54 additions and 0 deletions

45
.github/workflows/release-app.yaml vendored Normal file
View File

@ -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

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
key.properties

View File

@ -14,6 +14,14 @@ android {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
splits {
abi {
enable true
universalApk true
}
}
defaultConfig {
multiDexEnabled true
applicationId "app.myzel394.alibi"